home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / a_utils / perl / mac-perl / mcprl402.bin / Perl_src / util.c < prev    next >
MacBinary  |  1992-09-27  |  37.0 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
10% dexvert Jesper Olsen Module (music/jesperOlsen) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sun Sep 27 17:21:59 1992, modified Sun Sep 27 17:21:59 1992, creator 'MPS ', type ASCII, 37174 bytes "util.c" , at 0x91b6 428 bytes resource default (weak)
99% file data default
49% TrID Macintosh plain text (MacBinary) default
33% TrID TTComp archive compressed (bin-4K) default (weak)
16% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 06 75 74 69 6c 2e 63 | 00 00 00 00 00 00 00 00 |..util.c|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 91 36 00 | 00 01 ac a6 eb d6 77 a6 |......6.|......w.|
|00000060| eb d6 77 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..w.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 46 70 00 00 |........|....Fp..|
|00000080| 2f 2a 20 24 52 43 53 66 | 69 6c 65 3a 20 75 74 69 |/* $RCSf|ile: uti|
|00000090| 6c 2e 63 2c 76 20 24 24 | 52 65 76 69 73 69 6f 6e |l.c,v $$|Revision|
|000000a0| 3a 20 34 2e 30 2e 31 2e | 36 20 24 24 44 61 74 65 |: 4.0.1.|6 $$Date|
|000000b0| 3a 20 39 32 2f 30 36 2f | 31 31 20 32 31 3a 31 38 |: 92/06/|11 21:18|
|000000c0| 3a 34 37 20 24 0d 20 2a | 0d 20 2a 20 20 20 20 43 |:47 $. *|. * C|
|000000d0| 6f 70 79 72 69 67 68 74 | 20 28 63 29 20 31 39 39 |opyright| (c) 199|
|000000e0| 31 2c 20 4c 61 72 72 79 | 20 57 61 6c 6c 0d 20 2a |1, Larry| Wall. *|
|000000f0| 0d 20 2a 20 20 20 20 59 | 6f 75 20 6d 61 79 20 64 |. * Y|ou may d|
|00000100| 69 73 74 72 69 62 75 74 | 65 20 75 6e 64 65 72 20 |istribut|e under |
|00000110| 74 68 65 20 74 65 72 6d | 73 20 6f 66 20 65 69 74 |the term|s of eit|
|00000120| 68 65 72 20 74 68 65 20 | 47 4e 55 20 47 65 6e 65 |her the |GNU Gene|
|00000130| 72 61 6c 20 50 75 62 6c | 69 63 0d 20 2a 20 20 20 |ral Publ|ic. * |
|00000140| 20 4c 69 63 65 6e 73 65 | 20 6f 72 20 74 68 65 20 | License| or the |
|00000150| 41 72 74 69 73 74 69 63 | 20 4c 69 63 65 6e 73 65 |Artistic| License|
|00000160| 2c 20 61 73 20 73 70 65 | 63 69 66 69 65 64 20 69 |, as spe|cified i|
|00000170| 6e 20 74 68 65 20 52 45 | 41 44 4d 45 20 66 69 6c |n the RE|ADME fil|
|00000180| 65 2e 0d 20 2a 0d 20 2a | 20 24 4c 6f 67 3a 09 75 |e.. *. *| $Log:.u|
|00000190| 74 69 6c 2e 63 2c 76 20 | 24 0d 20 2a 20 52 65 76 |til.c,v |$. * Rev|
|000001a0| 69 73 69 6f 6e 20 34 2e | 30 2e 31 2e 36 20 20 39 |ision 4.|0.1.6 9|
|000001b0| 32 2f 30 36 2f 31 31 20 | 20 32 31 3a 31 38 3a 34 |2/06/11 | 21:18:4|
|000001c0| 37 20 20 6c 77 61 6c 6c | 0d 20 2a 20 70 61 74 63 |7 lwall|. * patc|
|000001d0| 68 33 34 3a 20 62 6f 6e | 65 68 65 61 64 65 64 20 |h34: bon|eheaded |
|000001e0| 74 79 70 6f 20 69 6e 20 | 6d 79 5f 62 63 6f 70 79 |typo in |my_bcopy|
|000001f0| 28 29 0d 20 2a 20 0d 20 | 2a 20 52 65 76 69 73 69 |(). * . |* Revisi|
|00000200| 6f 6e 20 34 2e 30 2e 31 | 2e 35 20 20 39 32 2f 30 |on 4.0.1|.5 92/0|
|00000210| 36 2f 30 38 20 20 31 36 | 3a 30 38 3a 33 37 20 20 |6/08 16|:08:37 |
|00000220| 6c 77 61 6c 6c 0d 20 2a | 20 70 61 74 63 68 32 30 |lwall. *| patch20|
|00000230| 3a 20 72 65 6d 6f 76 65 | 64 20 69 6d 70 6c 69 63 |: remove|d implic|
|00000240| 69 74 20 69 6e 74 20 64 | 65 63 6c 61 72 61 74 69 |it int d|eclarati|
|00000250| 6f 6e 73 20 6f 6e 20 66 | 75 6e 63 74 69 6f 6e 73 |ons on f|unctions|
|00000260| 0d 20 2a 20 70 61 74 63 | 68 32 30 3a 20 50 65 72 |. * patc|h20: Per|
|00000270| 6c 20 6e 6f 77 20 64 69 | 73 74 69 6e 67 75 69 73 |l now di|stinguis|
|00000280| 68 65 73 20 6f 76 65 72 | 6c 61 70 70 65 64 20 63 |hes over|lapped c|
|00000290| 6f 70 69 65 73 20 66 72 | 6f 6d 20 6e 6f 6e 2d 6f |opies fr|om non-o|
|000002a0| 76 65 72 6c 61 70 70 65 | 64 0d 20 2a 20 70 61 74 |verlappe|d. * pat|
|000002b0| 63 68 32 30 3a 20 66 69 | 78 65 64 20 63 6f 6e 66 |ch20: fi|xed conf|
|000002c0| 75 73 69 6f 6e 20 62 65 | 74 77 65 65 6e 20 61 20 |usion be|tween a |
|000002d0| 2a 76 61 72 27 73 20 72 | 65 61 6c 20 6e 61 6d 65 |*var's r|eal name|
|000002e0| 20 61 6e 64 20 69 74 73 | 20 65 66 66 65 63 74 69 | and its| effecti|
|000002f0| 76 65 20 6e 61 6d 65 0d | 20 2a 20 70 61 74 63 68 |ve name.| * patch|
|00000300| 32 30 3a 20 62 63 6f 70 | 79 28 29 20 61 6e 64 20 |20: bcop|y() and |
|00000310| 6d 65 6d 63 70 79 28 29 | 20 6e 6f 77 20 74 65 73 |memcpy()| now tes|
|00000320| 74 65 64 20 66 6f 72 20 | 6f 76 65 72 6c 61 70 20 |ted for |overlap |
|00000330| 73 61 66 65 74 79 0d 20 | 2a 20 70 61 74 63 68 32 |safety. |* patch2|
|00000340| 30 3a 20 61 64 64 65 64 | 20 41 74 61 72 69 20 53 |0: added| Atari S|
|00000350| 54 20 70 6f 72 74 61 62 | 69 6c 69 74 79 0d 20 2a |T portab|ility. *|
|00000360| 20 0d 20 2a 20 52 65 76 | 69 73 69 6f 6e 20 34 2e | . * Rev|ision 4.|
|00000370| 30 2e 31 2e 34 20 20 39 | 31 2f 31 31 2f 31 31 20 |0.1.4 9|1/11/11 |
|00000380| 20 31 36 3a 34 38 3a 35 | 34 20 20 6c 77 61 6c 6c | 16:48:5|4 lwall|
|00000390| 0d 20 2a 20 70 61 74 63 | 68 31 39 3a 20 73 74 75 |. * patc|h19: stu|
|000003a0| 64 79 20 77 61 73 20 62 | 75 73 74 65 64 20 62 79 |dy was b|usted by|
|000003b0| 20 34 2e 30 31 38 0d 20 | 2a 20 70 61 74 63 68 31 | 4.018. |* patch1|
|000003c0| 39 3a 20 61 64 64 65 64 | 20 6c 69 74 74 6c 65 2d |9: added| little-|
|000003d0| 65 6e 64 69 61 6e 20 70 | 61 63 6b 2f 75 6e 70 61 |endian p|ack/unpa|
|000003e0| 63 6b 20 6f 70 74 69 6f | 6e 73 0d 20 2a 20 0d 20 |ck optio|ns. * . |
|000003f0| 2a 20 52 65 76 69 73 69 | 6f 6e 20 34 2e 30 2e 31 |* Revisi|on 4.0.1|
|00000400| 2e 33 20 20 39 31 2f 31 | 31 2f 30 35 20 20 31 39 |.3 91/1|1/05 19|
|00000410| 3a 31 38 3a 32 36 20 20 | 6c 77 61 6c 6c 0d 20 2a |:18:26 |lwall. *|
|00000420| 20 70 61 74 63 68 31 31 | 3a 20 73 61 66 65 20 6d | patch11|: safe m|
|00000430| 61 6c 6c 6f 63 20 63 6f | 64 65 20 6e 6f 77 20 69 |alloc co|de now i|
|00000440| 6e 74 65 67 72 61 74 65 | 64 20 69 6e 74 6f 20 50 |ntegrate|d into P|
|00000450| 65 72 6c 27 73 20 6d 61 | 6c 6c 6f 63 20 77 68 65 |erl's ma|lloc whe|
|00000460| 6e 20 70 6f 73 73 69 62 | 6c 65 0d 20 2a 20 70 61 |n possib|le. * pa|
|00000470| 74 63 68 31 31 3a 20 69 | 6e 64 65 78 28 22 6c 69 |tch11: i|ndex("li|
|00000480| 74 74 6c 65 22 2c 20 22 | 6c 6f 6e 67 65 72 20 73 |ttle", "|longer s|
|00000490| 74 72 69 6e 67 22 29 20 | 63 6f 75 6c 64 20 76 69 |tring") |could vi|
|000004a0| 73 69 74 20 66 61 72 61 | 77 61 79 20 70 6c 61 63 |sit fara|way plac|
|000004b0| 65 73 0d 20 2a 20 70 61 | 74 63 68 31 31 3a 20 77 |es. * pa|tch11: w|
|000004c0| 61 72 6e 20 27 2d 27 20 | 78 20 31 30 30 30 30 20 |arn '-' |x 10000 |
|000004d0| 64 75 6d 70 65 64 20 63 | 6f 72 65 0d 20 2a 20 70 |dumped c|ore. * p|
|000004e0| 61 74 63 68 31 31 3a 20 | 66 6f 72 6b 65 64 20 65 |atch11: |forked e|
|000004f0| 78 65 63 20 6f 6e 20 6e | 6f 6e 2d 65 78 69 73 74 |xec on n|on-exist|
|00000500| 65 6e 74 20 70 72 6f 67 | 72 61 6d 20 6e 6f 77 20 |ent prog|ram now |
|00000510| 69 73 73 75 65 73 20 61 | 20 77 61 72 6e 69 6e 67 |issues a| warning|
|00000520| 0d 20 2a 20 0d 20 2a 20 | 52 65 76 69 73 69 6f 6e |. * . * |Revision|
|00000530| 20 34 2e 30 2e 31 2e 32 | 20 20 39 31 2f 30 36 2f | 4.0.1.2| 91/06/|
|00000540| 30 37 20 20 31 32 3a 31 | 30 3a 34 32 20 20 6c 77 |07 12:1|0:42 lw|
|00000550| 61 6c 6c 0d 20 2a 20 70 | 61 74 63 68 34 3a 20 6e |all. * p|atch4: n|
|00000560| 65 77 20 63 6f 70 79 72 | 69 67 68 74 20 6e 6f 74 |ew copyr|ight not|
|00000570| 69 63 65 0d 20 2a 20 70 | 61 74 63 68 34 3a 20 6d |ice. * p|atch4: m|
|00000580| 61 64 65 20 73 6f 6d 65 | 20 61 6c 6c 6f 77 61 6e |ade some| allowan|
|00000590| 63 65 73 20 66 6f 72 20 | 22 73 65 6d 69 2d 73 74 |ces for |"semi-st|
|000005a0| 61 6e 64 61 72 64 22 20 | 43 0d 20 2a 20 70 61 74 |andard" |C. * pat|
|000005b0| 63 68 34 3a 20 69 6e 64 | 65 78 28 29 20 63 6f 75 |ch4: ind|ex() cou|
|000005c0| 6c 64 20 62 6c 6f 77 20 | 75 70 20 73 65 61 72 63 |ld blow |up searc|
|000005d0| 68 69 6e 67 20 66 6f 72 | 20 6e 75 6c 6c 20 73 74 |hing for| null st|
|000005e0| 72 69 6e 67 0d 20 2a 20 | 70 61 74 63 68 34 3a 20 |ring. * |patch4: |
|000005f0| 74 61 69 6e 74 63 68 65 | 63 6b 73 20 63 6f 75 6c |taintche|cks coul|
|00000600| 64 20 69 6d 70 72 6f 70 | 65 72 6c 79 20 6d 6f 64 |d improp|erly mod|
|00000610| 69 66 79 20 70 61 72 65 | 6e 74 20 69 6e 20 76 66 |ify pare|nt in vf|
|00000620| 6f 72 6b 28 29 0d 20 2a | 20 70 61 74 63 68 34 3a |ork(). *| patch4:|
|00000630| 20 65 78 65 63 20 77 6f | 75 6c 64 20 63 6c 6f 73 | exec wo|uld clos|
|00000640| 65 20 66 69 6c 65 73 20 | 65 76 65 6e 20 69 66 20 |e files |even if |
|00000650| 79 6f 75 20 63 6c 65 61 | 72 65 64 20 63 6c 6f 73 |you clea|red clos|
|00000660| 65 2d 6f 6e 2d 65 78 65 | 63 20 66 6c 61 67 0d 20 |e-on-exe|c flag. |
|00000670| 2a 20 0d 20 2a 20 52 65 | 76 69 73 69 6f 6e 20 34 |* . * Re|vision 4|
|00000680| 2e 30 2e 31 2e 31 20 20 | 39 31 2f 30 34 2f 31 32 |.0.1.1 |91/04/12|
|00000690| 20 20 30 39 3a 31 39 3a | 32 35 20 20 6c 77 61 6c | 09:19:|25 lwal|
|000006a0| 6c 0d 20 2a 20 70 61 74 | 63 68 31 3a 20 72 61 6e |l. * pat|ch1: ran|
|000006b0| 64 6f 6d 20 63 6c 65 61 | 6e 75 70 20 69 6e 20 63 |dom clea|nup in c|
|000006c0| 70 70 20 6e 61 6d 65 73 | 70 61 63 65 0d 20 2a 20 |pp names|pace. * |
|000006d0| 0d 20 2a 20 52 65 76 69 | 73 69 6f 6e 20 34 2e 30 |. * Revi|sion 4.0|
|000006e0| 20 20 39 31 2f 30 33 2f | 32 30 20 20 30 31 3a 35 | 91/03/|20 01:5|
|000006f0| 36 3a 33 39 20 20 6c 77 | 61 6c 6c 0d 20 2a 20 34 |6:39 lw|all. * 4|
|00000700| 2e 30 20 62 61 73 65 6c | 69 6e 65 2e 0d 20 2a 20 |.0 basel|ine.. * |
|00000710| 0d 20 2a 2f 0d 2f 2a 53 | 55 50 50 52 45 53 53 20 |. */./*S|UPPRESS |
|00000720| 31 31 32 2a 2f 0d 0d 23 | 69 6e 63 6c 75 64 65 20 |112*/..#|include |
|00000730| 22 45 58 54 45 52 4e 2e | 68 22 0d 23 69 6e 63 6c |"EXTERN.|h".#incl|
|00000740| 75 64 65 20 22 70 65 72 | 6c 2e 68 22 0d 0d 23 69 |ude "per|l.h"..#i|
|00000750| 66 20 21 64 65 66 69 6e | 65 64 28 4e 53 49 47 29 |f !defin|ed(NSIG)|
|00000760| 20 7c 7c 20 64 65 66 69 | 6e 65 64 28 4d 5f 55 4e | || defi|ned(M_UN|
|00000770| 49 58 29 20 7c 7c 20 64 | 65 66 69 6e 65 64 28 4d |IX) || d|efined(M|
|00000780| 5f 58 45 4e 49 58 29 0d | 23 69 6e 63 6c 75 64 65 |_XENIX).|#include|
|00000790| 20 3c 73 69 67 6e 61 6c | 2e 68 3e 0d 23 65 6e 64 | <signal|.h>.#end|
|000007a0| 69 66 0d 0d 23 69 66 64 | 65 66 20 49 5f 56 46 4f |if..#ifd|ef I_VFO|
|000007b0| 52 4b 0d 23 20 20 69 6e | 63 6c 75 64 65 20 3c 76 |RK.# in|clude <v|
|000007c0| 66 6f 72 6b 2e 68 3e 0d | 23 65 6e 64 69 66 0d 0d |fork.h>.|#endif..|
|000007d0| 23 69 66 64 65 66 20 49 | 5f 56 41 52 41 52 47 53 |#ifdef I|_VARARGS|
|000007e0| 0d 23 20 20 69 6e 63 6c | 75 64 65 20 3c 76 61 72 |.# incl|ude <var|
|000007f0| 61 72 67 73 2e 68 3e 0d | 23 65 6e 64 69 66 0d 0d |args.h>.|#endif..|
|00000800| 23 69 66 64 65 66 20 49 | 5f 46 43 4e 54 4c 0d 23 |#ifdef I|_FCNTL.#|
|00000810| 20 20 69 6e 63 6c 75 64 | 65 20 3c 66 63 6e 74 6c | includ|e <fcntl|
|00000820| 2e 68 3e 0d 23 65 6e 64 | 69 66 0d 23 69 66 64 65 |.h>.#end|if.#ifde|
|00000830| 66 20 49 5f 53 59 53 5f | 46 49 4c 45 0d 23 20 20 |f I_SYS_|FILE.# |
|00000840| 69 6e 63 6c 75 64 65 20 | 3c 73 79 73 2f 66 69 6c |include |<sys/fil|
|00000850| 65 2e 68 3e 0d 23 65 6e | 64 69 66 0d 0d 23 64 65 |e.h>.#en|dif..#de|
|00000860| 66 69 6e 65 20 46 4c 55 | 53 48 0d 0d 23 69 66 6e |fine FLU|SH..#ifn|
|00000870| 64 65 66 20 73 61 66 65 | 6d 61 6c 6c 6f 63 0d 0d |def safe|malloc..|
|00000880| 73 74 61 74 69 63 20 63 | 68 61 72 20 6e 6f 6d 65 |static c|har nome|
|00000890| 6d 5b 5d 20 3d 20 22 4f | 75 74 20 6f 66 20 6d 65 |m[] = "O|ut of me|
|000008a0| 6d 6f 72 79 21 5c 6e 22 | 3b 0d 0d 2f 2a 20 70 61 |mory!\n"|;../* pa|
|000008b0| 72 61 6e 6f 69 64 20 76 | 65 72 73 69 6f 6e 20 6f |ranoid v|ersion o|
|000008c0| 66 20 6d 61 6c 6c 6f 63 | 20 2a 2f 0d 0d 23 69 66 |f malloc| */..#if|
|000008d0| 64 65 66 20 44 45 42 55 | 47 47 49 4e 47 0d 73 74 |def DEBU|GGING.st|
|000008e0| 61 74 69 63 20 69 6e 74 | 20 61 6e 20 3d 20 30 3b |atic int| an = 0;|
|000008f0| 0d 23 65 6e 64 69 66 0d | 0d 2f 2a 20 4e 4f 54 45 |.#endif.|./* NOTE|
|00000900| 3a 20 20 44 6f 20 6e 6f | 74 20 63 61 6c 6c 20 74 |: Do no|t call t|
|00000910| 68 65 20 6e 65 78 74 20 | 74 68 72 65 65 20 72 6f |he next |three ro|
|00000920| 75 74 69 6e 65 73 20 64 | 69 72 65 63 74 6c 79 2e |utines d|irectly.|
|00000930| 20 20 55 73 65 20 74 68 | 65 20 6d 61 63 72 6f 73 | Use th|e macros|
|00000940| 0d 20 2a 20 69 6e 20 68 | 61 6e 64 79 2e 68 2c 20 |. * in h|andy.h, |
|00000950| 73 6f 20 74 68 61 74 20 | 77 65 20 63 61 6e 20 65 |so that |we can e|
|00000960| 61 73 69 6c 79 20 72 65 | 64 65 66 69 6e 65 20 65 |asily re|define e|
|00000970| 76 65 72 79 74 68 69 6e | 67 20 74 6f 20 64 6f 20 |verythin|g to do |
|00000980| 74 72 61 63 6b 69 6e 67 | 20 6f 66 0d 20 2a 20 61 |tracking| of. * a|
|00000990| 6c 6c 6f 63 61 74 65 64 | 20 68 75 6e 6b 73 20 62 |llocated| hunks b|
|000009a0| 61 63 6b 20 74 6f 20 74 | 68 65 20 6f 72 69 67 69 |ack to t|he origi|
|000009b0| 6e 61 6c 20 4e 65 77 20 | 74 6f 20 74 72 61 63 6b |nal New |to track|
|000009c0| 20 64 6f 77 6e 20 61 6e | 79 20 6d 65 6d 6f 72 79 | down an|y memory|
|000009d0| 20 6c 65 61 6b 73 2e 0d | 20 2a 2f 0d 0d 63 68 61 | leaks..| */..cha|
|000009e0| 72 20 2a 0d 73 61 66 65 | 6d 61 6c 6c 6f 63 28 73 |r *.safe|malloc(s|
|000009f0| 69 7a 65 29 0d 23 69 66 | 64 65 66 20 4d 53 44 4f |ize).#if|def MSDO|
|00000a00| 53 0d 75 6e 73 69 67 6e | 65 64 20 6c 6f 6e 67 20 |S.unsign|ed long |
|00000a10| 73 69 7a 65 3b 0d 23 65 | 6c 73 65 0d 4d 45 4d 5f |size;.#e|lse.MEM_|
|00000a20| 53 49 5a 45 20 73 69 7a | 65 3b 0d 23 65 6e 64 69 |SIZE siz|e;.#endi|
|00000a30| 66 20 2f 2a 20 4d 53 44 | 4f 53 20 2a 2f 0d 7b 0d |f /* MSD|OS */.{.|
|00000a40| 20 20 20 20 63 68 61 72 | 20 2a 70 74 72 3b 0d 23 | char| *ptr;.#|
|00000a50| 69 66 6e 64 65 66 20 53 | 54 44 4d 41 43 0d 20 20 |ifndef S|TDMAC. |
|00000a60| 20 20 63 68 61 72 20 2a | 6d 61 6c 6c 6f 63 28 29 | char *|malloc()|
|00000a70| 3b 0d 23 65 6e 64 69 66 | 20 2f 2a 20 21 20 53 54 |;.#endif| /* ! ST|
|00000a80| 44 4d 41 43 20 2a 2f 0d | 0d 23 69 66 64 65 66 20 |DMAC */.|.#ifdef |
|00000a90| 4d 53 44 4f 53 0d 09 69 | 66 20 28 73 69 7a 65 20 |MSDOS..i|f (size |
|00000aa0| 3e 20 30 78 66 66 66 66 | 29 20 7b 0d 09 09 66 70 |> 0xffff|) {...fp|
|00000ab0| 72 69 6e 74 66 28 73 74 | 64 65 72 72 2c 20 22 41 |rintf(st|derr, "A|
|00000ac0| 6c 6c 6f 63 61 74 69 6f | 6e 20 74 6f 6f 20 6c 61 |llocatio|n too la|
|00000ad0| 72 67 65 3a 20 25 6c 78 | 5c 6e 22 2c 20 73 69 7a |rge: %lx|\n", siz|
|00000ae0| 65 29 20 46 4c 55 53 48 | 3b 0d 09 09 65 78 69 74 |e) FLUSH|;...exit|
|00000af0| 28 31 29 3b 0d 09 7d 0d | 23 65 6e 64 69 66 20 2f |(1);..}.|#endif /|
|00000b00| 2a 20 4d 53 44 4f 53 20 | 2a 2f 0d 23 69 66 64 65 |* MSDOS |*/.#ifde|
|00000b10| 66 20 44 45 42 55 47 47 | 49 4e 47 0d 20 20 20 20 |f DEBUGG|ING. |
|00000b20| 69 66 20 28 28 6c 6f 6e | 67 29 73 69 7a 65 20 3c |if ((lon|g)size <|
|00000b30| 20 30 29 0d 09 66 61 74 | 61 6c 28 22 70 61 6e 69 | 0)..fat|al("pani|
|00000b40| 63 3a 20 6d 61 6c 6c 6f | 63 22 29 3b 0d 23 65 6e |c: mallo|c");.#en|
|00000b50| 64 69 66 0d 20 20 20 20 | 70 74 72 20 3d 20 6d 61 |dif. |ptr = ma|
|00000b60| 6c 6c 6f 63 28 73 69 7a | 65 3f 73 69 7a 65 3a 31 |lloc(siz|e?size:1|
|00000b70| 29 3b 09 2f 2a 20 6d 61 | 6c 6c 6f 63 28 30 29 20 |);./* ma|lloc(0) |
|00000b80| 69 73 20 4e 41 53 54 59 | 20 6f 6e 20 6f 75 72 20 |is NASTY| on our |
|00000b90| 73 79 73 74 65 6d 20 2a | 2f 0d 23 69 66 64 65 66 |system *|/.#ifdef|
|00000ba0| 20 44 45 42 55 47 47 49 | 4e 47 0d 23 20 20 69 66 | DEBUGGI|NG.# if|
|00000bb0| 20 21 28 64 65 66 69 6e | 65 64 28 49 32 38 36 29 | !(defin|ed(I286)|
|00000bc0| 20 7c 7c 20 64 65 66 69 | 6e 65 64 28 61 74 61 72 | || defi|ned(atar|
|00000bd0| 69 73 74 29 29 0d 20 20 | 20 20 69 66 20 28 64 65 |ist)). | if (de|
|00000be0| 62 75 67 20 26 20 31 32 | 38 29 0d 09 66 70 72 69 |bug & 12|8)..fpri|
|00000bf0| 6e 74 66 28 73 74 64 65 | 72 72 2c 22 30 78 25 78 |ntf(stde|rr,"0x%x|
|00000c00| 3a 20 28 25 30 35 64 29 | 20 6d 61 6c 6c 6f 63 20 |: (%05d)| malloc |
|00000c10| 25 6c 64 20 62 79 74 65 | 73 5c 6e 22 2c 70 74 72 |%ld byte|s\n",ptr|
|00000c20| 2c 61 6e 2b 2b 2c 28 6c | 6f 6e 67 29 73 69 7a 65 |,an++,(l|ong)size|
|00000c30| 29 3b 0d 23 20 20 65 6c | 73 65 0d 20 20 20 20 69 |);.# el|se. i|
|00000c40| 66 20 28 64 65 62 75 67 | 20 26 20 31 32 38 29 0d |f (debug| & 128).|
|00000c50| 09 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c |.fprintf|(stderr,|
|00000c60| 22 30 78 25 6c 78 3a 20 | 28 25 30 35 64 29 20 6d |"0x%lx: |(%05d) m|
|00000c70| 61 6c 6c 6f 63 20 25 6c | 64 20 62 79 74 65 73 5c |alloc %l|d bytes\|
|00000c80| 6e 22 2c 70 74 72 2c 61 | 6e 2b 2b 2c 28 6c 6f 6e |n",ptr,a|n++,(lon|
|00000c90| 67 29 73 69 7a 65 29 3b | 0d 23 20 20 65 6e 64 69 |g)size);|.# endi|
|00000ca0| 66 0d 23 65 6e 64 69 66 | 0d 20 20 20 20 69 66 20 |f.#endif|. if |
|00000cb0| 28 70 74 72 20 21 3d 20 | 4e 75 6c 6c 63 68 29 0d |(ptr != |Nullch).|
|00000cc0| 09 72 65 74 75 72 6e 20 | 70 74 72 3b 0d 20 20 20 |.return |ptr;. |
|00000cd0| 20 65 6c 73 65 20 69 66 | 20 28 6e 6f 6d 65 6d 6f | else if| (nomemo|
|00000ce0| 6b 29 0d 09 72 65 74 75 | 72 6e 20 4e 75 6c 6c 63 |k)..retu|rn Nullc|
|00000cf0| 68 3b 0d 20 20 20 20 65 | 6c 73 65 20 7b 0d 09 66 |h;. e|lse {..f|
|00000d00| 70 75 74 73 28 6e 6f 6d | 65 6d 2c 73 74 64 65 72 |puts(nom|em,stder|
|00000d10| 72 29 20 46 4c 55 53 48 | 3b 0d 09 65 78 69 74 28 |r) FLUSH|;..exit(|
|00000d20| 31 29 3b 0d 20 20 20 20 | 7d 0d 20 20 20 20 2f 2a |1);. |}. /*|
|00000d30| 4e 4f 54 52 45 41 43 48 | 45 44 2a 2f 0d 23 69 66 |NOTREACH|ED*/.#if|
|00000d40| 64 65 66 20 6c 69 6e 74 | 0d 20 20 20 20 72 65 74 |def lint|. ret|
|00000d50| 75 72 6e 20 70 74 72 3b | 0d 23 65 6e 64 69 66 0d |urn ptr;|.#endif.|
|00000d60| 7d 0d 0d 2f 2a 20 70 61 | 72 61 6e 6f 69 64 20 76 |}../* pa|ranoid v|
|00000d70| 65 72 73 69 6f 6e 20 6f | 66 20 72 65 61 6c 6c 6f |ersion o|f reallo|
|00000d80| 63 20 2a 2f 0d 0d 63 68 | 61 72 20 2a 0d 73 61 66 |c */..ch|ar *.saf|
|00000d90| 65 72 65 61 6c 6c 6f 63 | 28 77 68 65 72 65 2c 73 |erealloc|(where,s|
|00000da0| 69 7a 65 29 0d 63 68 61 | 72 20 2a 77 68 65 72 65 |ize).cha|r *where|
|00000db0| 3b 0d 23 69 66 6e 64 65 | 66 20 4d 53 44 4f 53 0d |;.#ifnde|f MSDOS.|
|00000dc0| 4d 45 4d 5f 53 49 5a 45 | 20 73 69 7a 65 3b 0d 23 |MEM_SIZE| size;.#|
|00000dd0| 65 6c 73 65 0d 75 6e 73 | 69 67 6e 65 64 20 6c 6f |else.uns|igned lo|
|00000de0| 6e 67 20 73 69 7a 65 3b | 0d 23 65 6e 64 69 66 20 |ng size;|.#endif |
|00000df0| 2f 2a 20 4d 53 44 4f 53 | 20 2a 2f 0d 7b 0d 20 20 |/* MSDOS| */.{. |
|00000e00| 20 20 63 68 61 72 20 2a | 70 74 72 3b 0d 23 69 66 | char *|ptr;.#if|
|00000e10| 6e 64 65 66 20 53 54 44 | 4d 41 43 0d 20 20 20 20 |ndef STD|MAC. |
|00000e20| 63 68 61 72 20 2a 72 65 | 61 6c 6c 6f 63 28 29 3b |char *re|alloc();|
|00000e30| 0d 23 65 6e 64 69 66 20 | 2f 2a 20 21 20 53 54 44 |.#endif |/* ! STD|
|00000e40| 4d 41 43 20 2a 2f 0d 0d | 23 69 66 64 65 66 20 4d |MAC */..|#ifdef M|
|00000e50| 53 44 4f 53 0d 09 69 66 | 20 28 73 69 7a 65 20 3e |SDOS..if| (size >|
|00000e60| 20 30 78 66 66 66 66 29 | 20 7b 0d 09 09 66 70 72 | 0xffff)| {...fpr|
|00000e70| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 20 22 52 65 |intf(std|err, "Re|
|00000e80| 61 6c 6c 6f 63 61 74 69 | 6f 6e 20 74 6f 6f 20 6c |allocati|on too l|
|00000e90| 61 72 67 65 3a 20 25 6c | 78 5c 6e 22 2c 20 73 69 |arge: %l|x\n", si|
|00000ea0| 7a 65 29 20 46 4c 55 53 | 48 3b 0d 09 09 65 78 69 |ze) FLUS|H;...exi|
|00000eb0| 74 28 31 29 3b 0d 09 7d | 0d 23 65 6e 64 69 66 20 |t(1);..}|.#endif |
|00000ec0| 2f 2a 20 4d 53 44 4f 53 | 20 2a 2f 0d 20 20 20 20 |/* MSDOS| */. |
|00000ed0| 69 66 20 28 21 77 68 65 | 72 65 29 0d 09 66 61 74 |if (!whe|re)..fat|
|00000ee0| 61 6c 28 22 4e 75 6c 6c | 20 72 65 61 6c 6c 6f 63 |al("Null| realloc|
|00000ef0| 22 29 3b 0d 23 69 66 64 | 65 66 20 44 45 42 55 47 |");.#ifd|ef DEBUG|
|00000f00| 47 49 4e 47 0d 20 20 20 | 20 69 66 20 28 28 6c 6f |GING. | if ((lo|
|00000f10| 6e 67 29 73 69 7a 65 20 | 3c 20 30 29 0d 09 66 61 |ng)size |< 0)..fa|
|00000f20| 74 61 6c 28 22 70 61 6e | 69 63 3a 20 72 65 61 6c |tal("pan|ic: real|
|00000f30| 6c 6f 63 22 29 3b 0d 23 | 65 6e 64 69 66 0d 20 20 |loc");.#|endif. |
|00000f40| 20 20 70 74 72 20 3d 20 | 72 65 61 6c 6c 6f 63 28 | ptr = |realloc(|
|00000f50| 77 68 65 72 65 2c 73 69 | 7a 65 3f 73 69 7a 65 3a |where,si|ze?size:|
|00000f60| 31 29 3b 09 2f 2a 20 72 | 65 61 6c 6c 6f 63 28 30 |1);./* r|ealloc(0|
|00000f70| 29 20 69 73 20 4e 41 53 | 54 59 20 6f 6e 20 6f 75 |) is NAS|TY on ou|
|00000f80| 72 20 73 79 73 74 65 6d | 20 2a 2f 0d 23 69 66 64 |r system| */.#ifd|
|00000f90| 65 66 20 44 45 42 55 47 | 47 49 4e 47 0d 23 20 20 |ef DEBUG|GING.# |
|00000fa0| 69 66 20 21 28 64 65 66 | 69 6e 65 64 28 49 32 38 |if !(def|ined(I28|
|00000fb0| 36 29 20 7c 7c 20 64 65 | 66 69 6e 65 64 28 61 74 |6) || de|fined(at|
|00000fc0| 61 72 69 73 74 29 29 0d | 20 20 20 20 69 66 20 28 |arist)).| if (|
|00000fd0| 64 65 62 75 67 20 26 20 | 31 32 38 29 20 7b 0d 09 |debug & |128) {..|
|00000fe0| 66 70 72 69 6e 74 66 28 | 73 74 64 65 72 72 2c 22 |fprintf(|stderr,"|
|00000ff0| 30 78 25 78 3a 20 28 25 | 30 35 64 29 20 72 66 72 |0x%x: (%|05d) rfr|
|00001000| 65 65 5c 6e 22 2c 77 68 | 65 72 65 2c 61 6e 2b 2b |ee\n",wh|ere,an++|
|00001010| 29 3b 0d 09 66 70 72 69 | 6e 74 66 28 73 74 64 65 |);..fpri|ntf(stde|
|00001020| 72 72 2c 22 30 78 25 78 | 3a 20 28 25 30 35 64 29 |rr,"0x%x|: (%05d)|
|00001030| 20 72 65 61 6c 6c 6f 63 | 20 25 6c 64 20 62 79 74 | realloc| %ld byt|
|00001040| 65 73 5c 6e 22 2c 70 74 | 72 2c 61 6e 2b 2b 2c 28 |es\n",pt|r,an++,(|
|00001050| 6c 6f 6e 67 29 73 69 7a | 65 29 3b 0d 20 20 20 20 |long)siz|e);. |
|00001060| 7d 0d 23 20 20 65 6c 73 | 65 0d 20 20 20 20 69 66 |}.# els|e. if|
|00001070| 20 28 64 65 62 75 67 20 | 26 20 31 32 38 29 20 7b | (debug |& 128) {|
|00001080| 0d 09 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 |..fprint|f(stderr|
|00001090| 2c 22 30 78 25 6c 78 3a | 20 28 25 30 35 64 29 20 |,"0x%lx:| (%05d) |
|000010a0| 72 66 72 65 65 5c 6e 22 | 2c 77 68 65 72 65 2c 61 |rfree\n"|,where,a|
|000010b0| 6e 2b 2b 29 3b 0d 09 66 | 70 72 69 6e 74 66 28 73 |n++);..f|printf(s|
|000010c0| 74 64 65 72 72 2c 22 30 | 78 25 6c 78 3a 20 28 25 |tderr,"0|x%lx: (%|
|000010d0| 30 35 64 29 20 72 65 61 | 6c 6c 6f 63 20 25 6c 64 |05d) rea|lloc %ld|
|000010e0| 20 62 79 74 65 73 5c 6e | 22 2c 70 74 72 2c 61 6e | bytes\n|",ptr,an|
|000010f0| 2b 2b 2c 28 6c 6f 6e 67 | 29 73 69 7a 65 29 3b 0d |++,(long|)size);.|
|00001100| 20 20 20 20 7d 0d 23 20 | 20 65 6e 64 69 66 0d 23 | }.# | endif.#|
|00001110| 65 6e 64 69 66 0d 20 20 | 20 20 69 66 20 28 70 74 |endif. | if (pt|
|00001120| 72 20 21 3d 20 4e 75 6c | 6c 63 68 29 0d 09 72 65 |r != Nul|lch)..re|
|00001130| 74 75 72 6e 20 70 74 72 | 3b 0d 20 20 20 20 65 6c |turn ptr|;. el|
|00001140| 73 65 20 69 66 20 28 6e | 6f 6d 65 6d 6f 6b 29 0d |se if (n|omemok).|
|00001150| 09 72 65 74 75 72 6e 20 | 4e 75 6c 6c 63 68 3b 0d |.return |Nullch;.|
|00001160| 20 20 20 20 65 6c 73 65 | 20 7b 0d 09 66 70 75 74 | else| {..fput|
|00001170| 73 28 6e 6f 6d 65 6d 2c | 73 74 64 65 72 72 29 20 |s(nomem,|stderr) |
|00001180| 46 4c 55 53 48 3b 0d 09 | 65 78 69 74 28 31 29 3b |FLUSH;..|exit(1);|
|00001190| 0d 20 20 20 20 7d 0d 20 | 20 20 20 2f 2a 4e 4f 54 |. }. | /*NOT|
|000011a0| 52 45 41 43 48 45 44 2a | 2f 0d 23 69 66 64 65 66 |REACHED*|/.#ifdef|
|000011b0| 20 6c 69 6e 74 0d 20 20 | 20 20 72 65 74 75 72 6e | lint. | return|
|000011c0| 20 70 74 72 3b 0d 23 65 | 6e 64 69 66 0d 7d 0d 0d | ptr;.#e|ndif.}..|
|000011d0| 2f 2a 20 73 61 66 65 20 | 76 65 72 73 69 6f 6e 20 |/* safe |version |
|000011e0| 6f 66 20 66 72 65 65 20 | 2a 2f 0d 0d 76 6f 69 64 |of free |*/..void|
|000011f0| 0d 73 61 66 65 66 72 65 | 65 28 77 68 65 72 65 29 |.safefre|e(where)|
|00001200| 0d 63 68 61 72 20 2a 77 | 68 65 72 65 3b 0d 7b 0d |.char *w|here;.{.|
|00001210| 23 69 66 64 65 66 20 44 | 45 42 55 47 47 49 4e 47 |#ifdef D|EBUGGING|
|00001220| 0d 23 20 20 69 66 20 21 | 28 64 65 66 69 6e 65 64 |.# if !|(defined|
|00001230| 28 49 32 38 36 29 20 7c | 7c 20 64 65 66 69 6e 65 |(I286) ||| define|
|00001240| 64 28 61 74 61 72 69 73 | 74 29 29 0d 20 20 20 20 |d(ataris|t)). |
|00001250| 69 66 20 28 64 65 62 75 | 67 20 26 20 31 32 38 29 |if (debu|g & 128)|
|00001260| 0d 09 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 |..fprint|f(stderr|
|00001270| 2c 22 30 78 25 78 3a 20 | 28 25 30 35 64 29 20 66 |,"0x%x: |(%05d) f|
|00001280| 72 65 65 5c 6e 22 2c 77 | 68 65 72 65 2c 61 6e 2b |ree\n",w|here,an+|
|00001290| 2b 29 3b 0d 23 20 20 65 | 6c 73 65 0d 20 20 20 20 |+);.# e|lse. |
|000012a0| 69 66 20 28 64 65 62 75 | 67 20 26 20 31 32 38 29 |if (debu|g & 128)|
|000012b0| 0d 09 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 |..fprint|f(stderr|
|000012c0| 2c 22 30 78 25 6c 78 3a | 20 28 25 30 35 64 29 20 |,"0x%lx:| (%05d) |
|000012d0| 66 72 65 65 5c 6e 22 2c | 77 68 65 72 65 2c 61 6e |free\n",|where,an|
|000012e0| 2b 2b 29 3b 0d 23 20 20 | 65 6e 64 69 66 0d 23 65 |++);.# |endif.#e|
|000012f0| 6e 64 69 66 0d 20 20 20 | 20 69 66 20 28 77 68 65 |ndif. | if (whe|
|00001300| 72 65 29 20 7b 0d 09 2f | 2a 53 55 50 50 52 45 53 |re) {../|*SUPPRES|
|00001310| 53 20 37 30 31 2a 2f 0d | 09 66 72 65 65 28 77 68 |S 701*/.|.free(wh|
|00001320| 65 72 65 29 3b 0d 20 20 | 20 20 7d 0d 7d 0d 0d 23 |ere);. | }.}..#|
|00001330| 65 6e 64 69 66 20 2f 2a | 20 21 73 61 66 65 6d 61 |endif /*| !safema|
|00001340| 6c 6c 6f 63 20 2a 2f 0d | 0d 23 69 66 64 65 66 20 |lloc */.|.#ifdef |
|00001350| 4c 45 41 4b 54 45 53 54 | 0d 0d 23 64 65 66 69 6e |LEAKTEST|..#defin|
|00001360| 65 20 41 4c 49 47 4e 20 | 73 69 7a 65 6f 66 28 6c |e ALIGN |sizeof(l|
|00001370| 6f 6e 67 29 0d 0d 63 68 | 61 72 20 2a 0d 73 61 66 |ong)..ch|ar *.saf|
|00001380| 65 78 6d 61 6c 6c 6f 63 | 28 78 2c 73 69 7a 65 29 |exmalloc|(x,size)|
|00001390| 0d 69 6e 74 20 78 3b 0d | 4d 45 4d 5f 53 49 5a 45 |.int x;.|MEM_SIZE|
|000013a0| 20 73 69 7a 65 3b 0d 7b | 0d 20 20 20 20 72 65 67 | size;.{|. reg|
|000013b0| 69 73 74 65 72 20 63 68 | 61 72 20 2a 77 68 65 72 |ister ch|ar *wher|
|000013c0| 65 3b 0d 0d 20 20 20 20 | 77 68 65 72 65 20 3d 20 |e;.. |where = |
|000013d0| 73 61 66 65 6d 61 6c 6c | 6f 63 28 73 69 7a 65 20 |safemall|oc(size |
|000013e0| 2b 20 41 4c 49 47 4e 29 | 3b 0d 20 20 20 20 78 63 |+ ALIGN)|;. xc|
|000013f0| 6f 75 6e 74 5b 78 5d 2b | 2b 3b 0d 20 20 20 20 77 |ount[x]+|+;. w|
|00001400| 68 65 72 65 5b 30 5d 20 | 3d 20 78 20 25 20 31 30 |here[0] |= x % 10|
|00001410| 30 3b 0d 20 20 20 20 77 | 68 65 72 65 5b 31 5d 20 |0;. w|here[1] |
|00001420| 3d 20 78 20 2f 20 31 30 | 30 3b 0d 20 20 20 20 72 |= x / 10|0;. r|
|00001430| 65 74 75 72 6e 20 77 68 | 65 72 65 20 2b 20 41 4c |eturn wh|ere + AL|
|00001440| 49 47 4e 3b 0d 7d 0d 0d | 63 68 61 72 20 2a 0d 73 |IGN;.}..|char *.s|
|00001450| 61 66 65 78 72 65 61 6c | 6c 6f 63 28 77 68 65 72 |afexreal|loc(wher|
|00001460| 65 2c 73 69 7a 65 29 0d | 63 68 61 72 20 2a 77 68 |e,size).|char *wh|
|00001470| 65 72 65 3b 0d 4d 45 4d | 5f 53 49 5a 45 20 73 69 |ere;.MEM|_SIZE si|
|00001480| 7a 65 3b 0d 7b 0d 20 20 | 20 20 72 65 74 75 72 6e |ze;.{. | return|
|00001490| 20 73 61 66 65 72 65 61 | 6c 6c 6f 63 28 77 68 65 | saferea|lloc(whe|
|000014a0| 72 65 20 2d 20 41 4c 49 | 47 4e 2c 20 73 69 7a 65 |re - ALI|GN, size|
|000014b0| 20 2b 20 41 4c 49 47 4e | 29 20 2b 20 41 4c 49 47 | + ALIGN|) + ALIG|
|000014c0| 4e 3b 0d 7d 0d 0d 76 6f | 69 64 0d 73 61 66 65 78 |N;.}..vo|id.safex|
|000014d0| 66 72 65 65 28 77 68 65 | 72 65 29 0d 63 68 61 72 |free(whe|re).char|
|000014e0| 20 2a 77 68 65 72 65 3b | 0d 7b 0d 20 20 20 20 69 | *where;|.{. i|
|000014f0| 6e 74 20 78 3b 0d 0d 20 | 20 20 20 69 66 20 28 21 |nt x;.. | if (!|
|00001500| 77 68 65 72 65 29 0d 09 | 72 65 74 75 72 6e 3b 0d |where)..|return;.|
|00001510| 20 20 20 20 77 68 65 72 | 65 20 2d 3d 20 41 4c 49 | wher|e -= ALI|
|00001520| 47 4e 3b 0d 20 20 20 20 | 78 20 3d 20 77 68 65 72 |GN;. |x = wher|
|00001530| 65 5b 30 5d 20 2b 20 31 | 30 30 20 2a 20 77 68 65 |e[0] + 1|00 * whe|
|00001540| 72 65 5b 31 5d 3b 0d 20 | 20 20 20 78 63 6f 75 6e |re[1];. | xcoun|
|00001550| 74 5b 78 5d 2d 2d 3b 0d | 20 20 20 20 73 61 66 65 |t[x]--;.| safe|
|00001560| 66 72 65 65 28 77 68 65 | 72 65 29 3b 0d 7d 0d 0d |free(whe|re);.}..|
|00001570| 73 74 61 74 69 63 20 76 | 6f 69 64 0d 78 73 74 61 |static v|oid.xsta|
|00001580| 74 28 29 0d 7b 0d 20 20 | 20 20 72 65 67 69 73 74 |t().{. | regist|
|00001590| 65 72 20 69 6e 74 20 69 | 3b 0d 0d 20 20 20 20 66 |er int i|;.. f|
|000015a0| 6f 72 20 28 69 20 3d 20 | 30 3b 20 69 20 3c 20 4d |or (i = |0; i < M|
|000015b0| 41 58 58 43 4f 55 4e 54 | 3b 20 69 2b 2b 29 20 7b |AXXCOUNT|; i++) {|
|000015c0| 0d 09 69 66 20 28 78 63 | 6f 75 6e 74 5b 69 5d 20 |..if (xc|ount[i] |
|000015d0| 3e 20 6c 61 73 74 78 63 | 6f 75 6e 74 5b 69 5d 29 |> lastxc|ount[i])|
|000015e0| 20 7b 0d 09 20 20 20 20 | 66 70 72 69 6e 74 66 28 | {.. |fprintf(|
|000015f0| 73 74 64 65 72 72 2c 22 | 25 32 64 20 25 32 64 5c |stderr,"|%2d %2d\|
|00001600| 74 25 6c 64 5c 6e 22 2c | 20 69 20 2f 20 31 30 30 |t%ld\n",| i / 100|
|00001610| 2c 20 69 20 25 20 31 30 | 30 2c 20 78 63 6f 75 6e |, i % 10|0, xcoun|
|00001620| 74 5b 69 5d 29 3b 0d 09 | 20 20 20 20 6c 61 73 74 |t[i]);..| last|
|00001630| 78 63 6f 75 6e 74 5b 69 | 5d 20 3d 20 78 63 6f 75 |xcount[i|] = xcou|
|00001640| 6e 74 5b 69 5d 3b 0d 09 | 7d 0d 20 20 20 20 7d 0d |nt[i];..|}. }.|
|00001650| 7d 0d 0d 23 65 6e 64 69 | 66 20 2f 2a 20 4c 45 41 |}..#endi|f /* LEA|
|00001660| 4b 54 45 53 54 20 2a 2f | 0d 0d 2f 2a 20 63 6f 70 |KTEST */|../* cop|
|00001670| 79 20 61 20 73 74 72 69 | 6e 67 20 75 70 20 74 6f |y a stri|ng up to|
|00001680| 20 73 6f 6d 65 20 28 6e | 6f 6e 2d 62 61 63 6b 73 | some (n|on-backs|
|00001690| 6c 61 73 68 65 64 29 20 | 64 65 6c 69 6d 69 74 65 |lashed) |delimite|
|000016a0| 72 2c 20 69 66 20 61 6e | 79 20 2a 2f 0d 0d 63 68 |r, if an|y */..ch|
|000016b0| 61 72 20 2a 0d 63 70 79 | 74 69 6c 6c 28 74 6f 2c |ar *.cpy|till(to,|
|000016c0| 66 72 6f 6d 2c 66 72 6f | 6d 65 6e 64 2c 64 65 6c |from,fro|mend,del|
|000016d0| 69 6d 2c 72 65 74 6c 65 | 6e 29 0d 72 65 67 69 73 |im,retle|n).regis|
|000016e0| 74 65 72 20 63 68 61 72 | 20 2a 74 6f 3b 0d 72 65 |ter char| *to;.re|
|000016f0| 67 69 73 74 65 72 20 63 | 68 61 72 20 2a 66 72 6f |gister c|har *fro|
|00001700| 6d 3b 0d 72 65 67 69 73 | 74 65 72 20 63 68 61 72 |m;.regis|ter char|
|00001710| 20 2a 66 72 6f 6d 65 6e | 64 3b 0d 72 65 67 69 73 | *fromen|d;.regis|
|00001720| 74 65 72 20 69 6e 74 20 | 64 65 6c 69 6d 3b 0d 69 |ter int |delim;.i|
|00001730| 6e 74 20 2a 72 65 74 6c | 65 6e 3b 0d 7b 0d 20 20 |nt *retl|en;.{. |
|00001740| 20 20 63 68 61 72 20 2a | 6f 72 69 67 74 6f 20 3d | char *|origto =|
|00001750| 20 74 6f 3b 0d 0d 20 20 | 20 20 66 6f 72 20 28 3b | to;.. | for (;|
|00001760| 20 66 72 6f 6d 20 3c 20 | 66 72 6f 6d 65 6e 64 3b | from < |fromend;|
|00001770| 20 66 72 6f 6d 2b 2b 2c | 74 6f 2b 2b 29 20 7b 0d | from++,|to++) {.|
|00001780| 09 69 66 20 28 2a 66 72 | 6f 6d 20 3d 3d 20 27 5c |.if (*fr|om == '\|
|00001790| 5c 27 29 20 7b 0d 09 20 | 20 20 20 69 66 20 28 66 |\') {.. | if (f|
|000017a0| 72 6f 6d 5b 31 5d 20 3d | 3d 20 64 65 6c 69 6d 29 |rom[1] =|= delim)|
|000017b0| 0d 09 09 66 72 6f 6d 2b | 2b 3b 0d 09 20 20 20 20 |...from+|+;.. |
|000017c0| 65 6c 73 65 20 69 66 20 | 28 66 72 6f 6d 5b 31 5d |else if |(from[1]|
|000017d0| 20 3d 3d 20 27 5c 5c 27 | 29 0d 09 09 2a 74 6f 2b | == '\\'|)...*to+|
|000017e0| 2b 20 3d 20 2a 66 72 6f | 6d 2b 2b 3b 0d 09 7d 0d |+ = *fro|m++;..}.|
|000017f0| 09 65 6c 73 65 20 69 66 | 20 28 2a 66 72 6f 6d 20 |.else if| (*from |
|00001800| 3d 3d 20 64 65 6c 69 6d | 29 0d 09 20 20 20 20 62 |== delim|).. b|
|00001810| 72 65 61 6b 3b 0d 09 2a | 74 6f 20 3d 20 2a 66 72 |reak;..*|to = *fr|
|00001820| 6f 6d 3b 0d 20 20 20 20 | 7d 0d 20 20 20 20 2a 74 |om;. |}. *t|
|00001830| 6f 20 3d 20 27 5c 30 27 | 3b 0d 20 20 20 20 2a 72 |o = '\0'|;. *r|
|00001840| 65 74 6c 65 6e 20 3d 20 | 74 6f 20 2d 20 6f 72 69 |etlen = |to - ori|
|00001850| 67 74 6f 3b 0d 20 20 20 | 20 72 65 74 75 72 6e 20 |gto;. | return |
|00001860| 66 72 6f 6d 3b 0d 7d 0d | 0d 2f 2a 20 72 65 74 75 |from;.}.|./* retu|
|00001870| 72 6e 20 70 74 72 20 74 | 6f 20 6c 69 74 74 6c 65 |rn ptr t|o little|
|00001880| 20 73 74 72 69 6e 67 20 | 69 6e 20 62 69 67 20 73 | string |in big s|
|00001890| 74 72 69 6e 67 2c 20 4e | 55 4c 4c 20 69 66 20 6e |tring, N|ULL if n|
|000018a0| 6f 74 20 66 6f 75 6e 64 | 20 2a 2f 0d 2f 2a 20 54 |ot found| */./* T|
|000018b0| 68 69 73 20 72 6f 75 74 | 69 6e 65 20 77 61 73 20 |his rout|ine was |
|000018c0| 64 6f 6e 61 74 65 64 20 | 62 79 20 43 6f 72 65 79 |donated |by Corey|
|000018d0| 20 53 61 74 74 65 6e 2e | 20 2a 2f 0d 0d 63 68 61 | Satten.| */..cha|
|000018e0| 72 20 2a 0d 69 6e 73 74 | 72 28 62 69 67 2c 20 6c |r *.inst|r(big, l|
|000018f0| 69 74 74 6c 65 29 0d 72 | 65 67 69 73 74 65 72 20 |ittle).r|egister |
|00001900| 63 68 61 72 20 2a 62 69 | 67 3b 0d 72 65 67 69 73 |char *bi|g;.regis|
|00001910| 74 65 72 20 63 68 61 72 | 20 2a 6c 69 74 74 6c 65 |ter char| *little|
|00001920| 3b 0d 7b 0d 20 20 20 20 | 72 65 67 69 73 74 65 72 |;.{. |register|
|00001930| 20 63 68 61 72 20 2a 73 | 2c 20 2a 78 3b 0d 20 20 | char *s|, *x;. |
|00001940| 20 20 72 65 67 69 73 74 | 65 72 20 69 6e 74 20 66 | regist|er int f|
|00001950| 69 72 73 74 3b 0d 0d 20 | 20 20 20 69 66 20 28 21 |irst;.. | if (!|
|00001960| 6c 69 74 74 6c 65 29 0d | 09 72 65 74 75 72 6e 20 |little).|.return |
|00001970| 62 69 67 3b 0d 20 20 20 | 20 66 69 72 73 74 20 3d |big;. | first =|
|00001980| 20 2a 6c 69 74 74 6c 65 | 2b 2b 3b 0d 20 20 20 20 | *little|++;. |
|00001990| 69 66 20 28 21 66 69 72 | 73 74 29 0d 09 72 65 74 |if (!fir|st)..ret|
|000019a0| 75 72 6e 20 62 69 67 3b | 0d 20 20 20 20 77 68 69 |urn big;|. whi|
|000019b0| 6c 65 20 28 2a 62 69 67 | 29 20 7b 0d 09 69 66 20 |le (*big|) {..if |
|000019c0| 28 2a 62 69 67 2b 2b 20 | 21 3d 20 66 69 72 73 74 |(*big++ |!= first|
|000019d0| 29 0d 09 20 20 20 20 63 | 6f 6e 74 69 6e 75 65 3b |).. c|ontinue;|
|000019e0| 0d 09 66 6f 72 20 28 78 | 3d 62 69 67 2c 73 3d 6c |..for (x|=big,s=l|
|000019f0| 69 74 74 6c 65 3b 20 2a | 73 3b 20 2f 2a 2a 2f 20 |ittle; *|s; /**/ |
|00001a00| 29 20 7b 0d 09 20 20 20 | 20 69 66 20 28 21 2a 78 |) {.. | if (!*x|
|00001a10| 29 0d 09 09 72 65 74 75 | 72 6e 20 4e 75 6c 6c 63 |)...retu|rn Nullc|
|00001a20| 68 3b 0d 09 20 20 20 20 | 69 66 20 28 2a 73 2b 2b |h;.. |if (*s++|
|00001a30| 20 21 3d 20 2a 78 2b 2b | 29 20 7b 0d 09 09 73 2d | != *x++|) {...s-|
|00001a40| 2d 3b 0d 09 09 62 72 65 | 61 6b 3b 0d 09 20 20 20 |-;...bre|ak;.. |
|00001a50| 20 7d 0d 09 7d 0d 09 69 | 66 20 28 21 2a 73 29 0d | }..}..i|f (!*s).|
|00001a60| 09 20 20 20 20 72 65 74 | 75 72 6e 20 62 69 67 2d |. ret|urn big-|
|00001a70| 31 3b 0d 20 20 20 20 7d | 0d 20 20 20 20 72 65 74 |1;. }|. ret|
|00001a80| 75 72 6e 20 4e 75 6c 6c | 63 68 3b 0d 7d 0d 0d 2f |urn Null|ch;.}../|
|00001a90| 2a 20 73 61 6d 65 20 61 | 73 20 69 6e 73 74 72 20 |* same a|s instr |
|00001aa0| 62 75 74 20 61 6c 6c 6f | 77 20 65 6d 62 65 64 64 |but allo|w embedd|
|00001ab0| 65 64 20 6e 75 6c 6c 73 | 20 2a 2f 0d 0d 63 68 61 |ed nulls| */..cha|
|00001ac0| 72 20 2a 0d 6e 69 6e 73 | 74 72 28 62 69 67 2c 20 |r *.nins|tr(big, |
|00001ad0| 62 69 67 65 6e 64 2c 20 | 6c 69 74 74 6c 65 2c 20 |bigend, |little, |
|00001ae0| 6c 65 6e 64 29 0d 72 65 | 67 69 73 74 65 72 20 63 |lend).re|gister c|
|00001af0| 68 61 72 20 2a 62 69 67 | 3b 0d 72 65 67 69 73 74 |har *big|;.regist|
|00001b00| 65 72 20 63 68 61 72 20 | 2a 62 69 67 65 6e 64 3b |er char |*bigend;|
|00001b10| 0d 63 68 61 72 20 2a 6c | 69 74 74 6c 65 3b 0d 63 |.char *l|ittle;.c|
|00001b20| 68 61 72 20 2a 6c 65 6e | 64 3b 0d 7b 0d 20 20 20 |har *len|d;.{. |
|00001b30| 20 72 65 67 69 73 74 65 | 72 20 63 68 61 72 20 2a | registe|r char *|
|00001b40| 73 2c 20 2a 78 3b 0d 20 | 20 20 20 72 65 67 69 73 |s, *x;. | regis|
|00001b50| 74 65 72 20 69 6e 74 20 | 66 69 72 73 74 20 3d 20 |ter int |first = |
|00001b60| 2a 6c 69 74 74 6c 65 3b | 0d 20 20 20 20 72 65 67 |*little;|. reg|
|00001b70| 69 73 74 65 72 20 63 68 | 61 72 20 2a 6c 69 74 74 |ister ch|ar *litt|
|00001b80| 6c 65 65 6e 64 20 3d 20 | 6c 65 6e 64 3b 0d 0d 20 |leend = |lend;.. |
|00001b90| 20 20 20 69 66 20 28 21 | 66 69 72 73 74 20 26 26 | if (!|first &&|
|00001ba0| 20 6c 69 74 74 6c 65 20 | 3e 20 6c 69 74 74 6c 65 | little |> little|
|00001bb0| 65 6e 64 29 0d 09 72 65 | 74 75 72 6e 20 62 69 67 |end)..re|turn big|
|00001bc0| 3b 0d 20 20 20 20 69 66 | 20 28 62 69 67 65 6e 64 |;. if| (bigend|
|00001bd0| 20 2d 20 62 69 67 20 3c | 20 6c 69 74 74 6c 65 65 | - big <| littlee|
|00001be0| 6e 64 20 2d 20 6c 69 74 | 74 6c 65 29 0d 09 72 65 |nd - lit|tle)..re|
|00001bf0| 74 75 72 6e 20 4e 75 6c | 6c 63 68 3b 0d 20 20 20 |turn Nul|lch;. |
|00001c00| 20 62 69 67 65 6e 64 20 | 2d 3d 20 6c 69 74 74 6c | bigend |-= littl|
|00001c10| 65 65 6e 64 20 2d 20 6c | 69 74 74 6c 65 2b 2b 3b |eend - l|ittle++;|
|00001c20| 0d 20 20 20 20 77 68 69 | 6c 65 20 28 62 69 67 20 |. whi|le (big |
|00001c30| 3c 3d 20 62 69 67 65 6e | 64 29 20 7b 0d 09 69 66 |<= bigen|d) {..if|
|00001c40| 20 28 2a 62 69 67 2b 2b | 20 21 3d 20 66 69 72 73 | (*big++| != firs|
|00001c50| 74 29 0d 09 20 20 20 20 | 63 6f 6e 74 69 6e 75 65 |t).. |continue|
|00001c60| 3b 0d 09 66 6f 72 20 28 | 78 3d 62 69 67 2c 73 3d |;..for (|x=big,s=|
|00001c70| 6c 69 74 74 6c 65 3b 20 | 73 20 3c 20 6c 69 74 74 |little; |s < litt|
|00001c80| 6c 65 65 6e 64 3b 20 2f | 2a 2a 2f 20 29 20 7b 0d |leend; /|**/ ) {.|
|00001c90| 09 20 20 20 20 69 66 20 | 28 2a 73 2b 2b 20 21 3d |. if |(*s++ !=|
|00001ca0| 20 2a 78 2b 2b 29 20 7b | 0d 09 09 73 2d 2d 3b 0d | *x++) {|...s--;.|
|00001cb0| 09 09 62 72 65 61 6b 3b | 0d 09 20 20 20 20 7d 0d |..break;|.. }.|
|00001cc0| 09 7d 0d 09 69 66 20 28 | 73 20 3e 3d 20 6c 69 74 |.}..if (|s >= lit|
|00001cd0| 74 6c 65 65 6e 64 29 0d | 09 20 20 20 20 72 65 74 |tleend).|. ret|
|00001ce0| 75 72 6e 20 62 69 67 2d | 31 3b 0d 20 20 20 20 7d |urn big-|1;. }|
|00001cf0| 0d 20 20 20 20 72 65 74 | 75 72 6e 20 4e 75 6c 6c |. ret|urn Null|
|00001d00| 63 68 3b 0d 7d 0d 0d 2f | 2a 20 72 65 76 65 72 73 |ch;.}../|* revers|
|00001d10| 65 20 6f 66 20 74 68 65 | 20 61 62 6f 76 65 2d 2d |e of the| above--|
|00001d20| 66 69 6e 64 20 6c 61 73 | 74 20 73 75 62 73 74 72 |find las|t substr|
|00001d30| 69 6e 67 20 2a 2f 0d 0d | 63 68 61 72 20 2a 0d 72 |ing */..|char *.r|
|00001d40| 6e 69 6e 73 74 72 28 62 | 69 67 2c 20 62 69 67 65 |ninstr(b|ig, bige|
|00001d50| 6e 64 2c 20 6c 69 74 74 | 6c 65 2c 20 6c 65 6e 64 |nd, litt|le, lend|
|00001d60| 29 0d 72 65 67 69 73 74 | 65 72 20 63 68 61 72 20 |).regist|er char |
|00001d70| 2a 62 69 67 3b 0d 63 68 | 61 72 20 2a 62 69 67 65 |*big;.ch|ar *bige|
|00001d80| 6e 64 3b 0d 63 68 61 72 | 20 2a 6c 69 74 74 6c 65 |nd;.char| *little|
|00001d90| 3b 0d 63 68 61 72 20 2a | 6c 65 6e 64 3b 0d 7b 0d |;.char *|lend;.{.|
|00001da0| 20 20 20 20 72 65 67 69 | 73 74 65 72 20 63 68 61 | regi|ster cha|
|00001db0| 72 20 2a 62 69 67 62 65 | 67 3b 0d 20 20 20 20 72 |r *bigbe|g;. r|
|00001dc0| 65 67 69 73 74 65 72 20 | 63 68 61 72 20 2a 73 2c |egister |char *s,|
|00001dd0| 20 2a 78 3b 0d 20 20 20 | 20 72 65 67 69 73 74 65 | *x;. | registe|
|00001de0| 72 20 69 6e 74 20 66 69 | 72 73 74 20 3d 20 2a 6c |r int fi|rst = *l|
|00001df0| 69 74 74 6c 65 3b 0d 20 | 20 20 20 72 65 67 69 73 |ittle;. | regis|
|00001e00| 74 65 72 20 63 68 61 72 | 20 2a 6c 69 74 74 6c 65 |ter char| *little|
|00001e10| 65 6e 64 20 3d 20 6c 65 | 6e 64 3b 0d 0d 20 20 20 |end = le|nd;.. |
|00001e20| 20 69 66 20 28 21 66 69 | 72 73 74 20 26 26 20 6c | if (!fi|rst && l|
|00001e30| 69 74 74 6c 65 20 3e 20 | 6c 69 74 74 6c 65 65 6e |ittle > |littleen|
|00001e40| 64 29 0d 09 72 65 74 75 | 72 6e 20 62 69 67 65 6e |d)..retu|rn bigen|
|00001e50| 64 3b 0d 20 20 20 20 62 | 69 67 62 65 67 20 3d 20 |d;. b|igbeg = |
|00001e60| 62 69 67 3b 0d 20 20 20 | 20 62 69 67 20 3d 20 62 |big;. | big = b|
|00001e70| 69 67 65 6e 64 20 2d 20 | 28 6c 69 74 74 6c 65 65 |igend - |(littlee|
|00001e80| 6e 64 20 2d 20 6c 69 74 | 74 6c 65 2b 2b 29 3b 0d |nd - lit|tle++);.|
|00001e90| 20 20 20 20 77 68 69 6c | 65 20 28 62 69 67 20 3e | whil|e (big >|
|00001ea0| 3d 20 62 69 67 62 65 67 | 29 20 7b 0d 09 69 66 20 |= bigbeg|) {..if |
|00001eb0| 28 2a 62 69 67 2d 2d 20 | 21 3d 20 66 69 72 73 74 |(*big-- |!= first|
|00001ec0| 29 0d 09 20 20 20 20 63 | 6f 6e 74 69 6e 75 65 3b |).. c|ontinue;|
|00001ed0| 0d 09 66 6f 72 20 28 78 | 3d 62 69 67 2b 32 2c 73 |..for (x|=big+2,s|
|00001ee0| 3d 6c 69 74 74 6c 65 3b | 20 73 20 3c 20 6c 69 74 |=little;| s < lit|
|00001ef0| 74 6c 65 65 6e 64 3b 20 | 2f 2a 2a 2f 20 29 20 7b |tleend; |/**/ ) {|
|00001f00| 0d 09 20 20 20 20 69 66 | 20 28 2a 73 2b 2b 20 21 |.. if| (*s++ !|
|00001f10| 3d 20 2a 78 2b 2b 29 20 | 7b 0d 09 09 73 2d 2d 3b |= *x++) |{...s--;|
|00001f20| 0d 09 09 62 72 65 61 6b | 3b 0d 09 20 20 20 20 7d |...break|;.. }|
|00001f30| 0d 09 7d 0d 09 69 66 20 | 28 73 20 3e 3d 20 6c 69 |..}..if |(s >= li|
|00001f40| 74 74 6c 65 65 6e 64 29 | 0d 09 20 20 20 20 72 65 |ttleend)|.. re|
|00001f50| 74 75 72 6e 20 62 69 67 | 2b 31 3b 0d 20 20 20 20 |turn big|+1;. |
|00001f60| 7d 0d 20 20 20 20 72 65 | 74 75 72 6e 20 4e 75 6c |}. re|turn Nul|
|00001f70| 6c 63 68 3b 0d 7d 0d 0d | 75 6e 73 69 67 6e 65 64 |lch;.}..|unsigned|
|00001f80| 20 63 68 61 72 20 66 6f | 6c 64 5b 5d 20 3d 20 7b | char fo|ld[] = {|
|00001f90| 0d 09 30 2c 09 31 2c 09 | 32 2c 09 33 2c 09 34 2c |..0,.1,.|2,.3,.4,|
|00001fa0| 09 35 2c 09 36 2c 09 37 | 2c 0d 09 38 2c 09 39 2c |.5,.6,.7|,..8,.9,|
|00001fb0| 09 31 30 2c 09 31 31 2c | 09 31 32 2c 09 31 33 2c |.10,.11,|.12,.13,|
|00001fc0| 09 31 34 2c 09 31 35 2c | 0d 09 31 36 2c 09 31 37 |.14,.15,|..16,.17|
|00001fd0| 2c 09 31 38 2c 09 31 39 | 2c 09 32 30 2c 09 32 31 |,.18,.19|,.20,.21|
|00001fe0| 2c 09 32 32 2c 09 32 33 | 2c 0d 09 32 34 2c 09 32 |,.22,.23|,..24,.2|
|00001ff0| 35 2c 09 32 36 2c 09 32 | 37 2c 09 32 38 2c 09 32 |5,.26,.2|7,.28,.2|
|00002000| 39 2c 09 33 30 2c 09 33 | 31 2c 0d 09 33 32 2c 09 |9,.30,.3|1,..32,.|
|00002010| 33 33 2c 09 33 34 2c 09 | 33 35 2c 09 33 36 2c 09 |33,.34,.|35,.36,.|
|00002020| 33 37 2c 09 33 38 2c 09 | 33 39 2c 0d 09 34 30 2c |37,.38,.|39,..40,|
|00002030| 09 34 31 2c 09 34 32 2c | 09 34 33 2c 09 34 34 2c |.41,.42,|.43,.44,|
|00002040| 09 34 35 2c 09 34 36 2c | 09 34 37 2c 0d 09 34 38 |.45,.46,|.47,..48|
|00002050| 2c 09 34 39 2c 09 35 30 | 2c 09 35 31 2c 09 35 32 |,.49,.50|,.51,.52|
|00002060| 2c 09 35 33 2c 09 35 34 | 2c 09 35 35 2c 0d 09 35 |,.53,.54|,.55,..5|
|00002070| 36 2c 09 35 37 2c 09 35 | 38 2c 09 35 39 2c 09 36 |6,.57,.5|8,.59,.6|
|00002080| 30 2c 09 36 31 2c 09 36 | 32 2c 09 36 33 2c 0d 09 |0,.61,.6|2,.63,..|
|00002090| 36 34 2c 09 27 61 27 2c | 09 27 62 27 2c 09 27 63 |64,.'a',|.'b',.'c|
|000020a0| 27 2c 09 27 64 27 2c 09 | 27 65 27 2c 09 27 66 27 |',.'d',.|'e',.'f'|
|000020b0| 2c 09 27 67 27 2c 0d 09 | 27 68 27 2c 09 27 69 27 |,.'g',..|'h',.'i'|
|000020c0| 2c 09 27 6a 27 2c 09 27 | 6b 27 2c 09 27 6c 27 2c |,.'j',.'|k',.'l',|
|000020d0| 09 27 6d 27 2c 09 27 6e | 27 2c 09 27 6f 27 2c 0d |.'m',.'n|',.'o',.|
|000020e0| 09 27 70 27 2c 09 27 71 | 27 2c 09 27 72 27 2c 09 |.'p',.'q|',.'r',.|
|000020f0| 27 73 27 2c 09 27 74 27 | 2c 09 27 75 27 2c 09 27 |'s',.'t'|,.'u',.'|
|00002100| 76 27 2c 09 27 77 27 2c | 0d 09 27 78 27 2c 09 27 |v',.'w',|..'x',.'|
|00002110| 79 27 2c 09 27 7a 27 2c | 09 39 31 2c 09 39 32 2c |y',.'z',|.91,.92,|
|00002120| 09 39 33 2c 09 39 34 2c | 09 39 35 2c 0d 09 39 36 |.93,.94,|.95,..96|
|00002130| 2c 09 27 41 27 2c 09 27 | 42 27 2c 09 27 43 27 2c |,.'A',.'|B',.'C',|
|00002140| 09 27 44 27 2c 09 27 45 | 27 2c 09 27 46 27 2c 09 |.'D',.'E|',.'F',.|
|00002150| 27 47 27 2c 0d 09 27 48 | 27 2c 09 27 49 27 2c 09 |'G',..'H|',.'I',.|
|00002160| 27 4a 27 2c 09 27 4b 27 | 2c 09 27 4c 27 2c 09 27 |'J',.'K'|,.'L',.'|
|00002170| 4d 27 2c 09 27 4e 27 2c | 09 27 4f 27 2c 0d 09 27 |M',.'N',|.'O',..'|
|00002180| 50 27 2c 09 27 51 27 2c | 09 27 52 27 2c 09 27 53 |P',.'Q',|.'R',.'S|
|00002190| 27 2c 09 27 54 27 2c 09 | 27 55 27 2c 09 27 56 27 |',.'T',.|'U',.'V'|
|000021a0| 2c 09 27 57 27 2c 0d 09 | 27 58 27 2c 09 27 59 27 |,.'W',..|'X',.'Y'|
|000021b0| 2c 09 27 5a 27 2c 09 31 | 32 33 2c 09 31 32 34 2c |,.'Z',.1|23,.124,|
|000021c0| 09 31 32 35 2c 09 31 32 | 36 2c 09 31 32 37 2c 0d |.125,.12|6,.127,.|
|000021d0| 09 31 32 38 2c 09 31 32 | 39 2c 09 31 33 30 2c 09 |.128,.12|9,.130,.|
|000021e0| 31 33 31 2c 09 31 33 32 | 2c 09 31 33 33 2c 09 31 |131,.132|,.133,.1|
|000021f0| 33 34 2c 09 31 33 35 2c | 0d 09 31 33 36 2c 09 31 |34,.135,|..136,.1|
|00002200| 33 37 2c 09 31 33 38 2c | 09 31 33 39 2c 09 31 34 |37,.138,|.139,.14|
|00002210| 30 2c 09 31 34 31 2c 09 | 31 34 32 2c 09 31 34 33 |0,.141,.|142,.143|
|00002220| 2c 0d 09 31 34 34 2c 09 | 31 34 35 2c 09 31 34 36 |,..144,.|145,.146|
|00002230| 2c 09 31 34 37 2c 09 31 | 34 38 2c 09 31 34 39 2c |,.147,.1|48,.149,|
|00002240| 09 31 35 30 2c 09 31 35 | 31 2c 0d 09 31 35 32 2c |.150,.15|1,..152,|
|00002250| 09 31 35 33 2c 09 31 35 | 34 2c 09 31 35 35 2c 09 |.153,.15|4,.155,.|
|00002260| 31 35 36 2c 09 31 35 37 | 2c 09 31 35 38 2c 09 31 |156,.157|,.158,.1|
|00002270| 35 39 2c 0d 09 31 36 30 | 2c 09 31 36 31 2c 09 31 |59,..160|,.161,.1|
|00002280| 36 32 2c 09 31 36 33 2c | 09 31 36 34 2c 09 31 36 |62,.163,|.164,.16|
|00002290| 35 2c 09 31 36 36 2c 09 | 31 36 37 2c 0d 09 31 36 |5,.166,.|167,..16|
|000022a0| 38 2c 09 31 36 39 2c 09 | 31 37 30 2c 09 31 37 31 |8,.169,.|170,.171|
|000022b0| 2c 09 31 37 32 2c 09 31 | 37 33 2c 09 31 37 34 2c |,.172,.1|73,.174,|
|000022c0| 09 31 37 35 2c 0d 09 31 | 37 36 2c 09 31 37 37 2c |.175,..1|76,.177,|
|000022d0| 09 31 37 38 2c 09 31 37 | 39 2c 09 31 38 30 2c 09 |.178,.17|9,.180,.|
|000022e0| 31 38 31 2c 09 31 38 32 | 2c 09 31 38 33 2c 0d 09 |181,.182|,.183,..|
|000022f0| 31 38 34 2c 09 31 38 35 | 2c 09 31 38 36 2c 09 31 |184,.185|,.186,.1|
|00002300| 38 37 2c 09 31 38 38 2c | 09 31 38 39 2c 09 31 39 |87,.188,|.189,.19|
|00002310| 30 2c 09 31 39 31 2c 0d | 09 31 39 32 2c 09 31 39 |0,.191,.|.192,.19|
|00002320| 33 2c 09 31 39 34 2c 09 | 31 39 35 2c 09 31 39 36 |3,.194,.|195,.196|
|00002330| 2c 09 31 39 37 2c 09 31 | 39 38 2c 09 31 39 39 2c |,.197,.1|98,.199,|
|00002340| 0d 09 32 30 30 2c 09 32 | 30 31 2c 09 32 30 32 2c |..200,.2|01,.202,|
|00002350| 09 32 30 33 2c 09 32 30 | 34 2c 09 32 30 35 2c 09 |.203,.20|4,.205,.|
|00002360| 32 30 36 2c 09 32 30 37 | 2c 0d 09 32 30 38 2c 09 |206,.207|,..208,.|
|00002370| 32 30 39 2c 09 32 31 30 | 2c 09 32 31 31 2c 09 32 |209,.210|,.211,.2|
|00002380| 31 32 2c 09 32 31 33 2c | 09 32 31 34 2c 09 32 31 |12,.213,|.214,.21|
|00002390| 35 2c 0d 09 32 31 36 2c | 09 32 31 37 2c 09 32 31 |5,..216,|.217,.21|
|000023a0| 38 2c 09 32 31 39 2c 09 | 32 32 30 2c 09 32 32 31 |8,.219,.|220,.221|
|000023b0| 2c 09 32 32 32 2c 09 32 | 32 33 2c 09 0d 09 32 32 |,.222,.2|23,...22|
|000023c0| 34 2c 09 32 32 35 2c 09 | 32 32 36 2c 09 32 32 37 |4,.225,.|226,.227|
|000023d0| 2c 09 32 32 38 2c 09 32 | 32 39 2c 09 32 33 30 2c |,.228,.2|29,.230,|
|000023e0| 09 32 33 31 2c 0d 09 32 | 33 32 2c 09 32 33 33 2c |.231,..2|32,.233,|
|000023f0| 09 32 33 34 2c 09 32 33 | 35 2c 09 32 33 36 2c 09 |.234,.23|5,.236,.|
|00002400| 32 33 37 2c 09 32 33 38 | 2c 09 32 33 39 2c 0d 09 |237,.238|,.239,..|
|00002410| 32 34 30 2c 09 32 34 31 | 2c 09 32 34 32 2c 09 32 |240,.241|,.242,.2|
|00002420| 34 33 2c 09 32 34 34 2c | 09 32 34 35 2c 09 32 34 |43,.244,|.245,.24|
|00002430| 36 2c 09 32 34 37 2c 0d | 09 32 34 38 2c 09 32 34 |6,.247,.|.248,.24|
|00002440| 39 2c 09 32 35 30 2c 09 | 32 35 31 2c 09 32 35 32 |9,.250,.|251,.252|
|00002450| 2c 09 32 35 33 2c 09 32 | 35 34 2c 09 32 35 35 0d |,.253,.2|54,.255.|
|00002460| 7d 3b 0d 0d 73 74 61 74 | 69 63 20 75 6e 73 69 67 |};..stat|ic unsig|
|00002470| 6e 65 64 20 63 68 61 72 | 20 66 72 65 71 5b 5d 20 |ned char| freq[] |
|00002480| 3d 20 7b 0d 09 31 2c 09 | 32 2c 09 38 34 2c 09 31 |= {..1,.|2,.84,.1|
|00002490| 35 31 2c 09 31 35 34 2c | 09 31 35 35 2c 09 31 35 |51,.154,|.155,.15|
|000024a0| 36 2c 09 31 35 37 2c 0d | 09 31 36 35 2c 09 32 34 |6,.157,.|.165,.24|
|000024b0| 36 2c 09 32 35 30 2c 09 | 33 2c 09 31 35 38 2c 09 |6,.250,.|3,.158,.|
|000024c0| 37 2c 09 31 38 2c 09 32 | 39 2c 0d 09 34 30 2c 09 |7,.18,.2|9,..40,.|
|000024d0| 35 31 2c 09 36 32 2c 09 | 37 33 2c 09 38 35 2c 09 |51,.62,.|73,.85,.|
|000024e0| 39 36 2c 09 31 30 37 2c | 09 31 31 38 2c 0d 09 31 |96,.107,|.118,..1|
|000024f0| 32 39 2c 09 31 34 30 2c | 09 31 34 37 2c 09 31 34 |29,.140,|.147,.14|
|00002500| 38 2c 09 31 34 39 2c 09 | 31 35 30 2c 09 31 35 32 |8,.149,.|150,.152|
|00002510| 2c 09 31 35 33 2c 0d 09 | 32 35 35 2c 09 31 38 32 |,.153,..|255,.182|
|00002520| 2c 09 32 32 34 2c 09 32 | 30 35 2c 09 31 37 34 2c |,.224,.2|05,.174,|
|00002530| 09 31 37 36 2c 09 31 38 | 30 2c 09 32 31 37 2c 0d |.176,.18|0,.217,.|
|00002540| 09 32 33 33 2c 09 32 33 | 32 2c 09 32 33 36 2c 09 |.233,.23|2,.236,.|
|00002550| 31 38 37 2c 09 32 33 35 | 2c 09 32 32 38 2c 09 32 |187,.235|,.228,.2|
|00002560| 33 34 2c 09 32 32 36 2c | 0d 09 32 32 32 2c 09 32 |34,.226,|..222,.2|
|00002570| 31 39 2c 09 32 31 31 2c | 09 31 39 35 2c 09 31 38 |19,.211,|.195,.18|
|00002580| 38 2c 09 31 39 33 2c 09 | 31 38 35 2c 09 31 38 34 |8,.193,.|185,.184|
|00002590| 2c 0d 09 31 39 31 2c 09 | 31 38 33 2c 09 32 30 31 |,..191,.|183,.201|
|000025a0| 2c 09 32 32 39 2c 09 31 | 38 31 2c 09 32 32 30 2c |,.229,.1|81,.220,|
|000025b0| 09 31 39 34 2c 09 31 36 | 32 2c 0d 09 31 36 33 2c |.194,.16|2,..163,|
|000025c0| 09 32 30 38 2c 09 31 38 | 36 2c 09 32 30 32 2c 09 |.208,.18|6,.202,.|
|000025d0| 32 30 30 2c 09 32 31 38 | 2c 09 31 39 38 2c 09 31 |200,.218|,.198,.1|
|000025e0| 37 39 2c 0d 09 31 37 38 | 2c 09 32 31 34 2c 09 31 |79,..178|,.214,.1|
|000025f0| 36 36 2c 09 31 37 30 2c | 09 32 30 37 2c 09 31 39 |66,.170,|.207,.19|
|00002600| 39 2c 09 32 30 39 2c 09 | 32 30 36 2c 0d 09 32 30 |9,.209,.|206,..20|
|00002610| 34 2c 09 31 36 30 2c 09 | 32 31 32 2c 09 32 31 36 |4,.160,.|212,.216|
|00002620| 2c 09 32 31 35 2c 09 31 | 39 32 2c 09 31 37 35 2c |,.215,.1|92,.175,|
|00002630| 09 31 37 33 2c 0d 09 32 | 34 33 2c 09 31 37 32 2c |.173,..2|43,.172,|
|00002640| 09 31 36 31 2c 09 31 39 | 30 2c 09 32 30 33 2c 09 |.161,.19|0,.203,.|
|00002650| 31 38 39 2c 09 31 36 34 | 2c 09 32 33 30 2c 0d 09 |189,.164|,.230,..|
|00002660| 31 36 37 2c 09 32 34 38 | 2c 09 32 32 37 2c 09 32 |167,.248|,.227,.2|
|00002670| 34 34 2c 09 32 34 32 2c | 09 32 35 35 2c 09 32 34 |44,.242,|.255,.24|
|00002680| 31 2c 09 32 33 31 2c 0d | 09 32 34 30 2c 09 32 35 |1,.231,.|.240,.25|
|00002690| 33 2c 09 31 36 39 2c 09 | 32 31 30 2c 09 32 34 35 |3,.169,.|210,.245|
|000026a0| 2c 09 32 33 37 2c 09 32 | 34 39 2c 09 32 34 37 2c |,.237,.2|49,.247,|
|000026b0| 0d 09 32 33 39 2c 09 31 | 36 38 2c 09 32 35 32 2c |..239,.1|68,.252,|
|000026c0| 09 32 35 31 2c 09 32 35 | 34 2c 09 32 33 38 2c 09 |.251,.25|4,.238,.|
|000026d0| 32 32 33 2c 09 32 32 31 | 2c 0d 09 32 31 33 2c 09 |223,.221|,..213,.|
|000026e0| 32 32 35 2c 09 31 37 37 | 2c 09 31 39 37 2c 09 31 |225,.177|,.197,.1|
|000026f0| 37 31 2c 09 31 39 36 2c | 09 31 35 39 2c 09 34 2c |71,.196,|.159,.4,|
|00002700| 0d 09 35 2c 09 36 2c 09 | 38 2c 09 39 2c 09 31 30 |..5,.6,.|8,.9,.10|
|00002710| 2c 09 31 31 2c 09 31 32 | 2c 09 31 33 2c 0d 09 31 |,.11,.12|,.13,..1|
|00002720| 34 2c 09 31 35 2c 09 31 | 36 2c 09 31 37 2c 09 31 |4,.15,.1|6,.17,.1|
|00002730| 39 2c 09 32 30 2c 09 32 | 31 2c 09 32 32 2c 0d 09 |9,.20,.2|1,.22,..|
|00002740| 32 33 2c 09 32 34 2c 09 | 32 35 2c 09 32 36 2c 09 |23,.24,.|25,.26,.|
|00002750| 32 37 2c 09 32 38 2c 09 | 33 30 2c 09 33 31 2c 0d |27,.28,.|30,.31,.|
|00002760| 09 33 32 2c 09 33 33 2c | 09 33 34 2c 09 33 35 2c |.32,.33,|.34,.35,|
|00002770| 09 33 36 2c 09 33 37 2c | 09 33 38 2c 09 33 39 2c |.36,.37,|.38,.39,|
|00002780| 0d 09 34 31 2c 09 34 32 | 2c 09 34 33 2c 09 34 34 |..41,.42|,.43,.44|
|00002790| 2c 09 34 35 2c 09 34 36 | 2c 09 34 37 2c 09 34 38 |,.45,.46|,.47,.48|
|000027a0| 2c 0d 09 34 39 2c 09 35 | 30 2c 09 35 32 2c 09 35 |,..49,.5|0,.52,.5|
|000027b0| 33 2c 09 35 34 2c 09 35 | 35 2c 09 35 36 2c 09 35 |3,.54,.5|5,.56,.5|
|000027c0| 37 2c 0d 09 35 38 2c 09 | 35 39 2c 09 36 30 2c 09 |7,..58,.|59,.60,.|
|000027d0| 36 31 2c 09 36 33 2c 09 | 36 34 2c 09 36 35 2c 09 |61,.63,.|64,.65,.|
|000027e0| 36 36 2c 0d 09 36 37 2c | 09 36 38 2c 09 36 39 2c |66,..67,|.68,.69,|
|000027f0| 09 37 30 2c 09 37 31 2c | 09 37 32 2c 09 37 34 2c |.70,.71,|.72,.74,|
|00002800| 09 37 35 2c 0d 09 37 36 | 2c 09 37 37 2c 09 37 38 |.75,..76|,.77,.78|
|00002810| 2c 09 37 39 2c 09 38 30 | 2c 09 38 31 2c 09 38 32 |,.79,.80|,.81,.82|
|00002820| 2c 09 38 33 2c 0d 09 38 | 36 2c 09 38 37 2c 09 38 |,.83,..8|6,.87,.8|
|00002830| 38 2c 09 38 39 2c 09 39 | 30 2c 09 39 31 2c 09 39 |8,.89,.9|0,.91,.9|
|00002840| 32 2c 09 39 33 2c 0d 09 | 39 34 2c 09 39 35 2c 09 |2,.93,..|94,.95,.|
|00002850| 39 37 2c 09 39 38 2c 09 | 39 39 2c 09 31 30 30 2c |97,.98,.|99,.100,|
|00002860| 09 31 30 31 2c 09 31 30 | 32 2c 0d 09 31 30 33 2c |.101,.10|2,..103,|
|00002870| 09 31 30 34 2c 09 31 30 | 35 2c 09 31 30 36 2c 09 |.104,.10|5,.106,.|
|00002880| 31 30 38 2c 09 31 30 39 | 2c 09 31 31 30 2c 09 31 |108,.109|,.110,.1|
|00002890| 31 31 2c 0d 09 31 31 32 | 2c 09 31 31 33 2c 09 31 |11,..112|,.113,.1|
|000028a0| 31 34 2c 09 31 31 35 2c | 09 31 31 36 2c 09 31 31 |14,.115,|.116,.11|
|000028b0| 37 2c 09 31 31 39 2c 09 | 31 32 30 2c 0d 09 31 32 |7,.119,.|120,..12|
|000028c0| 31 2c 09 31 32 32 2c 09 | 31 32 33 2c 09 31 32 34 |1,.122,.|123,.124|
|000028d0| 2c 09 31 32 35 2c 09 31 | 32 36 2c 09 31 32 37 2c |,.125,.1|26,.127,|
|000028e0| 09 31 32 38 2c 0d 09 31 | 33 30 2c 09 31 33 31 2c |.128,..1|30,.131,|
|000028f0| 09 31 33 32 2c 09 31 33 | 33 2c 09 31 33 34 2c 09 |.132,.13|3,.134,.|
|00002900| 31 33 35 2c 09 31 33 36 | 2c 09 31 33 37 2c 0d 09 |135,.136|,.137,..|
|00002910| 31 33 38 2c 09 31 33 39 | 2c 09 31 34 31 2c 09 31 |138,.139|,.141,.1|
|00002920| 34 32 2c 09 31 34 33 2c | 09 31 34 34 2c 09 31 34 |42,.143,|.144,.14|
|00002930| 35 2c 09 31 34 36 0d 7d | 3b 0d 0d 76 6f 69 64 0d |5,.146.}|;..void.|
|00002940| 66 62 6d 63 6f 6d 70 69 | 6c 65 28 73 74 72 2c 20 |fbmcompi|le(str, |
|00002950| 69 66 6c 61 67 29 0d 53 | 54 52 20 2a 73 74 72 3b |iflag).S|TR *str;|
|00002960| 0d 69 6e 74 20 69 66 6c | 61 67 3b 0d 7b 0d 20 20 |.int ifl|ag;.{. |
|00002970| 20 20 72 65 67 69 73 74 | 65 72 20 75 6e 73 69 67 | regist|er unsig|
|00002980| 6e 65 64 20 63 68 61 72 | 20 2a 73 3b 0d 20 20 20 |ned char| *s;. |
|00002990| 20 72 65 67 69 73 74 65 | 72 20 75 6e 73 69 67 6e | registe|r unsign|
|000029a0| 65 64 20 63 68 61 72 20 | 2a 74 61 62 6c 65 3b 0d |ed char |*table;.|
|000029b0| 20 20 20 20 72 65 67 69 | 73 74 65 72 20 75 6e 73 | regi|ster uns|
|000029c0| 69 67 6e 65 64 20 69 6e | 74 20 69 3b 0d 20 20 20 |igned in|t i;. |
|000029d0| 20 72 65 67 69 73 74 65 | 72 20 75 6e 73 69 67 6e | registe|r unsign|
|000029e0| 65 64 20 69 6e 74 20 6c | 65 6e 20 3d 20 73 74 72 |ed int l|en = str|
|000029f0| 2d 3e 73 74 72 5f 63 75 | 72 3b 0d 20 20 20 20 69 |->str_cu|r;. i|
|00002a00| 6e 74 20 72 61 72 65 73 | 74 20 3d 20 30 3b 0d 20 |nt rares|t = 0;. |
|00002a10| 20 20 20 75 6e 73 69 67 | 6e 65 64 20 69 6e 74 20 | unsig|ned int |
|00002a20| 66 72 65 71 75 65 6e 63 | 79 20 3d 20 32 35 36 3b |frequenc|y = 256;|
|00002a30| 0d 0d 20 20 20 20 53 74 | 72 5f 47 72 6f 77 28 73 |.. St|r_Grow(s|
|00002a40| 74 72 2c 6c 65 6e 2b 32 | 35 38 29 3b 0d 23 69 66 |tr,len+2|58);.#if|
|00002a50| 6e 64 65 66 20 6c 69 6e | 74 0d 20 20 20 20 74 61 |ndef lin|t. ta|
|00002a60| 62 6c 65 20 3d 20 28 75 | 6e 73 69 67 6e 65 64 20 |ble = (u|nsigned |
|00002a70| 63 68 61 72 2a 29 28 73 | 74 72 2d 3e 73 74 72 5f |char*)(s|tr->str_|
|00002a80| 70 74 72 20 2b 20 6c 65 | 6e 20 2b 20 31 29 3b 0d |ptr + le|n + 1);.|
|00002a90| 23 65 6c 73 65 0d 20 20 | 20 20 74 61 62 6c 65 20 |#else. | table |
|00002aa0| 3d 20 4e 75 6c 6c 28 75 | 6e 73 69 67 6e 65 64 20 |= Null(u|nsigned |
|00002ab0| 63 68 61 72 2a 29 3b 0d | 23 65 6e 64 69 66 0d 20 |char*);.|#endif. |
|00002ac0| 20 20 20 73 20 3d 20 74 | 61 62 6c 65 20 2d 20 32 | s = t|able - 2|
|00002ad0| 3b 0d 20 20 20 20 66 6f | 72 20 28 69 20 3d 20 30 |;. fo|r (i = 0|
|00002ae0| 3b 20 69 20 3c 20 32 35 | 36 3b 20 69 2b 2b 29 20 |; i < 25|6; i++) |
|00002af0| 7b 0d 09 74 61 62 6c 65 | 5b 69 5d 20 3d 20 6c 65 |{..table|[i] = le|
|00002b00| 6e 3b 0d 20 20 20 20 7d | 0d 20 20 20 20 69 20 3d |n;. }|. i =|
|00002b10| 20 30 3b 0d 23 69 66 6e | 64 65 66 20 6c 69 6e 74 | 0;.#ifn|def lint|
|00002b20| 0d 20 20 20 20 77 68 69 | 6c 65 20 28 73 20 3e 3d |. whi|le (s >=|
|00002b30| 20 28 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 2a | (unsign|ed char*|
|00002b40| 29 28 73 74 72 2d 3e 73 | 74 72 5f 70 74 72 29 29 |)(str->s|tr_ptr))|
|00002b50| 0d 23 65 6e 64 69 66 0d | 20 20 20 20 7b 0d 09 69 |.#endif.| {..i|
|00002b60| 66 20 28 74 61 62 6c 65 | 5b 2a 73 5d 20 3d 3d 20 |f (table|[*s] == |
|00002b70| 6c 65 6e 29 20 7b 0d 23 | 69 66 6e 64 65 66 20 70 |len) {.#|ifndef p|
|00002b80| 64 70 31 31 0d 09 20 20 | 20 20 69 66 20 28 69 66 |dp11.. | if (if|
|00002b90| 6c 61 67 29 0d 09 09 74 | 61 62 6c 65 5b 2a 73 5d |lag)...t|able[*s]|
|00002ba0| 20 3d 20 74 61 62 6c 65 | 5b 66 6f 6c 64 5b 2a 73 | = table|[fold[*s|
|00002bb0| 5d 5d 20 3d 20 69 3b 0d | 23 65 6c 73 65 0d 09 20 |]] = i;.|#else.. |
|00002bc0| 20 20 20 69 66 20 28 69 | 66 6c 61 67 29 20 7b 0d | if (i|flag) {.|
|00002bd0| 09 09 69 6e 74 20 6a 3b | 0d 09 09 6a 20 3d 20 66 |..int j;|...j = f|
|00002be0| 6f 6c 64 5b 2a 73 5d 3b | 0d 09 09 74 61 62 6c 65 |old[*s];|...table|
|00002bf0| 5b 6a 5d 20 3d 20 69 3b | 0d 09 09 74 61 62 6c 65 |[j] = i;|...table|
|00002c00| 5b 2a 73 5d 20 3d 20 69 | 3b 0d 09 20 20 20 20 7d |[*s] = i|;.. }|
|00002c10| 0d 23 65 6e 64 69 66 20 | 2f 2a 20 70 64 70 31 31 |.#endif |/* pdp11|
|00002c20| 20 2a 2f 0d 09 20 20 20 | 20 65 6c 73 65 0d 09 09 | */.. | else...|
|00002c30| 74 61 62 6c 65 5b 2a 73 | 5d 20 3d 20 69 3b 0d 09 |table[*s|] = i;..|
|00002c40| 7d 0d 09 73 2d 2d 2c 69 | 2b 2b 3b 0d 20 20 20 20 |}..s--,i|++;. |
|00002c50| 7d 0d 20 20 20 20 73 74 | 72 2d 3e 73 74 72 5f 70 |}. st|r->str_p|
|00002c60| 6f 6b 20 7c 3d 20 53 50 | 5f 46 42 4d 3b 09 09 2f |ok |= SP|_FBM;../|
|00002c70| 2a 20 64 65 65 70 20 6d | 61 67 69 63 20 2a 2f 0d |* deep m|agic */.|
|00002c80| 0d 23 69 66 6e 64 65 66 | 20 6c 69 6e 74 0d 20 20 |.#ifndef| lint. |
|00002c90| 20 20 73 20 3d 20 28 75 | 6e 73 69 67 6e 65 64 20 | s = (u|nsigned |
|00002ca0| 63 68 61 72 2a 29 28 73 | 74 72 2d 3e 73 74 72 5f |char*)(s|tr->str_|
|00002cb0| 70 74 72 29 3b 09 09 2f | 2a 20 64 65 65 70 65 72 |ptr);../|* deeper|
|00002cc0| 20 6d 61 67 69 63 20 2a | 2f 0d 23 65 6c 73 65 0d | magic *|/.#else.|
|00002cd0| 20 20 20 20 73 20 3d 20 | 4e 75 6c 6c 28 75 6e 73 | s = |Null(uns|
|00002ce0| 69 67 6e 65 64 20 63 68 | 61 72 2a 29 3b 0d 23 65 |igned ch|ar*);.#e|
|00002cf0| 6e 64 69 66 0d 20 20 20 | 20 69 66 20 28 69 66 6c |ndif. | if (ifl|
|00002d00| 61 67 29 20 7b 0d 09 72 | 65 67 69 73 74 65 72 20 |ag) {..r|egister |
|00002d10| 75 6e 73 69 67 6e 65 64 | 20 69 6e 74 20 74 6d 70 |unsigned| int tmp|
|00002d20| 2c 20 66 6f 6c 64 74 6d | 70 3b 0d 09 73 74 72 2d |, foldtm|p;..str-|
|00002d30| 3e 73 74 72 5f 70 6f 6b | 20 7c 3d 20 53 50 5f 43 |>str_pok| |= SP_C|
|00002d40| 41 53 45 46 4f 4c 44 3b | 0d 09 66 6f 72 20 28 69 |ASEFOLD;|..for (i|
|00002d50| 20 3d 20 30 3b 20 69 20 | 3c 20 6c 65 6e 3b 20 69 | = 0; i |< len; i|
|00002d60| 2b 2b 29 20 7b 0d 09 20 | 20 20 20 74 6d 70 3d 66 |++) {.. | tmp=f|
|00002d70| 72 65 71 5b 73 5b 69 5d | 5d 3b 0d 09 20 20 20 20 |req[s[i]|];.. |
|00002d80| 66 6f 6c 64 74 6d 70 3d | 66 72 65 71 5b 66 6f 6c |foldtmp=|freq[fol|
|00002d90| 64 5b 73 5b 69 5d 5d 5d | 3b 0d 09 20 20 20 20 69 |d[s[i]]]|;.. i|
|00002da0| 66 20 28 74 6d 70 20 3c | 20 66 72 65 71 75 65 6e |f (tmp <| frequen|
|00002db0| 63 79 20 26 26 20 66 6f | 6c 64 74 6d 70 20 3c 20 |cy && fo|ldtmp < |
|00002dc0| 66 72 65 71 75 65 6e 63 | 79 29 20 7b 0d 09 09 72 |frequenc|y) {...r|
|00002dd0| 61 72 65 73 74 20 3d 20 | 69 3b 0d 09 09 2f 2a 20 |arest = |i;.../* |
|00002de0| 63 68 6f 6f 73 65 20 6d | 6f 73 74 20 66 72 65 71 |choose m|ost freq|
|00002df0| 75 65 6e 74 20 61 6d 6f | 6e 67 20 74 68 65 20 74 |uent amo|ng the t|
|00002e00| 77 6f 20 2a 2f 0d 09 09 | 66 72 65 71 75 65 6e 63 |wo */...|frequenc|
|00002e10| 79 20 3d 20 28 74 6d 70 | 20 3e 20 66 6f 6c 64 74 |y = (tmp| > foldt|
|00002e20| 6d 70 29 20 3f 20 74 6d | 70 20 3a 20 66 6f 6c 64 |mp) ? tm|p : fold|
|00002e30| 74 6d 70 3b 0d 09 20 20 | 20 20 7d 0d 09 7d 0d 20 |tmp;.. | }..}. |
|00002e40| 20 20 20 7d 0d 20 20 20 | 20 65 6c 73 65 20 7b 0d | }. | else {.|
|00002e50| 09 66 6f 72 20 28 69 20 | 3d 20 30 3b 20 69 20 3c |.for (i |= 0; i <|
|00002e60| 20 6c 65 6e 3b 20 69 2b | 2b 29 20 7b 0d 09 20 20 | len; i+|+) {.. |
|00002e70| 20 20 69 66 20 28 66 72 | 65 71 5b 73 5b 69 5d 5d | if (fr|eq[s[i]]|
|00002e80| 20 3c 20 66 72 65 71 75 | 65 6e 63 79 29 20 7b 0d | < frequ|ency) {.|
|00002e90| 09 09 72 61 72 65 73 74 | 20 3d 20 69 3b 0d 09 09 |..rarest| = i;...|
|00002ea0| 66 72 65 71 75 65 6e 63 | 79 20 3d 20 66 72 65 71 |frequenc|y = freq|
|00002eb0| 5b 73 5b 69 5d 5d 3b 0d | 09 20 20 20 20 7d 0d 09 |[s[i]];.|. }..|
|00002ec0| 7d 0d 20 20 20 20 7d 0d | 20 20 20 20 73 74 72 2d |}. }.| str-|
|00002ed0| 3e 73 74 72 5f 72 61 72 | 65 20 3d 20 73 5b 72 61 |>str_rar|e = s[ra|
|00002ee0| 72 65 73 74 5d 3b 0d 20 | 20 20 20 73 74 72 2d 3e |rest];. | str->|
|00002ef0| 73 74 72 5f 73 74 61 74 | 65 20 3d 20 72 61 72 65 |str_stat|e = rare|
|00002f00| 73 74 3b 0d 23 69 66 64 | 65 66 20 44 45 42 55 47 |st;.#ifd|ef DEBUG|
|00002f10| 47 49 4e 47 0d 20 20 20 | 20 69 66 20 28 64 65 62 |GING. | if (deb|
|00002f20| 75 67 20 26 20 35 31 32 | 29 0d 09 66 70 72 69 6e |ug & 512|)..fprin|
|00002f30| 74 66 28 73 74 64 65 72 | 72 2c 22 72 61 72 65 73 |tf(stder|r,"rares|
|00002f40| 74 20 63 68 61 72 20 25 | 63 20 61 74 20 25 64 5c |t char %|c at %d\|
|00002f50| 6e 22 2c 73 74 72 2d 3e | 73 74 72 5f 72 61 72 65 |n",str->|str_rare|
|00002f60| 2c 20 73 74 72 2d 3e 73 | 74 72 5f 73 74 61 74 65 |, str->s|tr_state|
|00002f70| 29 3b 0d 23 65 6e 64 69 | 66 0d 7d 0d 0d 63 68 61 |);.#endi|f.}..cha|
|00002f80| 72 20 2a 0d 66 62 6d 69 | 6e 73 74 72 28 62 69 67 |r *.fbmi|nstr(big|
|00002f90| 2c 20 62 69 67 65 6e 64 | 2c 20 6c 69 74 74 6c 65 |, bigend|, little|
|00002fa0| 73 74 72 29 0d 75 6e 73 | 69 67 6e 65 64 20 63 68 |str).uns|igned ch|
|00002fb0| 61 72 20 2a 62 69 67 3b | 0d 72 65 67 69 73 74 65 |ar *big;|.registe|
|00002fc0| 72 20 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 20 |r unsign|ed char |
|00002fd0| 2a 62 69 67 65 6e 64 3b | 0d 53 54 52 20 2a 6c 69 |*bigend;|.STR *li|
|00002fe0| 74 74 6c 65 73 74 72 3b | 0d 7b 0d 20 20 20 20 72 |ttlestr;|.{. r|
|00002ff0| 65 67 69 73 74 65 72 20 | 75 6e 73 69 67 6e 65 64 |egister |unsigned|
|00003000| 20 63 68 61 72 20 2a 73 | 3b 0d 20 20 20 20 72 65 | char *s|;. re|
|00003010| 67 69 73 74 65 72 20 69 | 6e 74 20 74 6d 70 3b 0d |gister i|nt tmp;.|
|00003020| 20 20 20 20 72 65 67 69 | 73 74 65 72 20 69 6e 74 | regi|ster int|
|00003030| 20 6c 69 74 74 6c 65 6c | 65 6e 3b 0d 20 20 20 20 | littlel|en;. |
|00003040| 72 65 67 69 73 74 65 72 | 20 75 6e 73 69 67 6e 65 |register| unsigne|
|00003050| 64 20 63 68 61 72 20 2a | 6c 69 74 74 6c 65 3b 0d |d char *|little;.|
|00003060| 20 20 20 20 72 65 67 69 | 73 74 65 72 20 75 6e 73 | regi|ster uns|
|00003070| 69 67 6e 65 64 20 63 68 | 61 72 20 2a 74 61 62 6c |igned ch|ar *tabl|
|00003080| 65 3b 0d 20 20 20 20 72 | 65 67 69 73 74 65 72 20 |e;. r|egister |
|00003090| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 20 2a 6f |unsigned| char *o|
|000030a0| 6c 64 73 3b 0d 20 20 20 | 20 72 65 67 69 73 74 65 |lds;. | registe|
|000030b0| 72 20 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 20 |r unsign|ed char |
|000030c0| 2a 6f 6c 64 6c 69 74 74 | 6c 65 3b 0d 0d 23 69 66 |*oldlitt|le;..#if|
|000030d0| 6e 64 65 66 20 6c 69 6e | 74 0d 20 20 20 20 69 66 |ndef lin|t. if|
|000030e0| 20 28 21 28 6c 69 74 74 | 6c 65 73 74 72 2d 3e 73 | (!(litt|lestr->s|
|000030f0| 74 72 5f 70 6f 6b 20 26 | 20 53 50 5f 46 42 4d 29 |tr_pok &| SP_FBM)|
|00003100| 29 20 7b 0d 09 69 66 20 | 28 21 6c 69 74 74 6c 65 |) {..if |(!little|
|00003110| 73 74 72 2d 3e 73 74 72 | 5f 70 74 72 29 0d 09 20 |str->str|_ptr).. |
|00003120| 20 20 20 72 65 74 75 72 | 6e 20 28 63 68 61 72 2a | retur|n (char*|
|00003130| 29 62 69 67 3b 0d 09 72 | 65 74 75 72 6e 20 6e 69 |)big;..r|eturn ni|
|00003140| 6e 73 74 72 28 28 63 68 | 61 72 2a 29 62 69 67 2c |nstr((ch|ar*)big,|
|00003150| 28 63 68 61 72 2a 29 62 | 69 67 65 6e 64 2c 0d 09 |(char*)b|igend,..|
|00003160| 09 6c 69 74 74 6c 65 73 | 74 72 2d 3e 73 74 72 5f |.littles|tr->str_|
|00003170| 70 74 72 2c 20 6c 69 74 | 74 6c 65 73 74 72 2d 3e |ptr, lit|tlestr->|
|00003180| 73 74 72 5f 70 74 72 20 | 2b 20 6c 69 74 74 6c 65 |str_ptr |+ little|
|00003190| 73 74 72 2d 3e 73 74 72 | 5f 63 75 72 29 3b 0d 20 |str->str|_cur);. |
|000031a0| 20 20 20 7d 0d 23 65 6e | 64 69 66 0d 0d 20 20 20 | }.#en|dif.. |
|000031b0| 20 6c 69 74 74 6c 65 6c | 65 6e 20 3d 20 6c 69 74 | littlel|en = lit|
|000031c0| 74 6c 65 73 74 72 2d 3e | 73 74 72 5f 63 75 72 3b |tlestr->|str_cur;|
|000031d0| 0d 23 69 66 6e 64 65 66 | 20 6c 69 6e 74 0d 20 20 |.#ifndef| lint. |
|000031e0| 20 20 69 66 20 28 6c 69 | 74 74 6c 65 73 74 72 2d | if (li|ttlestr-|
|000031f0| 3e 73 74 72 5f 70 6f 6b | 20 26 20 53 50 5f 54 41 |>str_pok| & SP_TA|
|00003200| 49 4c 20 26 26 20 21 6d | 75 6c 74 69 6c 69 6e 65 |IL && !m|ultiline|
|00003210| 29 20 7b 09 2f 2a 20 74 | 61 69 6c 20 61 6e 63 68 |) {./* t|ail anch|
|00003220| 6f 72 65 64 3f 20 2a 2f | 0d 09 69 66 20 28 6c 69 |ored? */|..if (li|
|00003230| 74 74 6c 65 6c 65 6e 20 | 3e 20 62 69 67 65 6e 64 |ttlelen |> bigend|
|00003240| 20 2d 20 62 69 67 29 0d | 09 20 20 20 20 72 65 74 | - big).|. ret|
|00003250| 75 72 6e 20 4e 75 6c 6c | 63 68 3b 0d 09 6c 69 74 |urn Null|ch;..lit|
|00003260| 74 6c 65 20 3d 20 28 75 | 6e 73 69 67 6e 65 64 20 |tle = (u|nsigned |
|00003270| 63 68 61 72 2a 29 6c 69 | 74 74 6c 65 73 74 72 2d |char*)li|ttlestr-|
|00003280| 3e 73 74 72 5f 70 74 72 | 3b 0d 09 69 66 20 28 6c |>str_ptr|;..if (l|
|00003290| 69 74 74 6c 65 73 74 72 | 2d 3e 73 74 72 5f 70 6f |ittlestr|->str_po|
|000032a0| 6b 20 26 20 53 50 5f 43 | 41 53 45 46 4f 4c 44 29 |k & SP_C|ASEFOLD)|
|000032b0| 20 7b 09 2f 2a 20 6f 6f | 70 73 2c 20 66 61 6b 65 | {./* oo|ps, fake|
|000032c0| 20 69 74 20 2a 2f 0d 09 | 20 20 20 20 62 69 67 20 | it */..| big |
|000032d0| 3d 20 62 69 67 65 6e 64 | 20 2d 20 6c 69 74 74 6c |= bigend| - littl|
|000032e0| 65 6c 65 6e 3b 09 09 2f | 2a 20 6a 75 73 74 20 73 |elen;../|* just s|
|000032f0| 74 61 72 74 20 6e 65 61 | 72 20 65 6e 64 20 2a 2f |tart nea|r end */|
|00003300| 0d 09 20 20 20 20 69 66 | 20 28 62 69 67 65 6e 64 |.. if| (bigend|
|00003310| 5b 2d 31 5d 20 3d 3d 20 | 27 5c 6e 27 20 26 26 20 |[-1] == |'\n' && |
|00003320| 6c 69 74 74 6c 65 5b 6c | 69 74 74 6c 65 6c 65 6e |little[l|ittlelen|
|00003330| 2d 31 5d 20 21 3d 20 27 | 5c 6e 27 29 0d 09 09 62 |-1] != '|\n')...b|
|00003340| 69 67 2d 2d 3b 0d 09 7d | 0d 09 65 6c 73 65 20 7b |ig--;..}|..else {|
|00003350| 0d 09 20 20 20 20 73 20 | 3d 20 62 69 67 65 6e 64 |.. s |= bigend|
|00003360| 20 2d 20 6c 69 74 74 6c | 65 6c 65 6e 3b 0d 09 20 | - littl|elen;.. |
|00003370| 20 20 20 69 66 20 28 2a | 73 20 3d 3d 20 2a 6c 69 | if (*|s == *li|
|00003380| 74 74 6c 65 20 26 26 20 | 62 63 6d 70 28 73 2c 6c |ttle && |bcmp(s,l|
|00003390| 69 74 74 6c 65 2c 6c 69 | 74 74 6c 65 6c 65 6e 29 |ittle,li|ttlelen)|
|000033a0| 3d 3d 30 29 0d 09 09 72 | 65 74 75 72 6e 20 28 63 |==0)...r|eturn (c|
|000033b0| 68 61 72 2a 29 73 3b 09 | 09 2f 2a 20 68 6f 77 20 |har*)s;.|./* how |
|000033c0| 73 77 65 65 74 20 69 74 | 20 69 73 20 2a 2f 0d 09 |sweet it| is */..|
|000033d0| 20 20 20 20 65 6c 73 65 | 20 69 66 20 28 62 69 67 | else| if (big|
|000033e0| 65 6e 64 5b 2d 31 5d 20 | 3d 3d 20 27 5c 6e 27 20 |end[-1] |== '\n' |
|000033f0| 26 26 20 6c 69 74 74 6c | 65 5b 6c 69 74 74 6c 65 |&& littl|e[little|
|00003400| 6c 65 6e 2d 31 5d 20 21 | 3d 20 27 5c 6e 27 0d 09 |len-1] !|= '\n'..|
|00003410| 20 20 20 20 20 20 26 26 | 20 73 20 3e 20 62 69 67 | &&| s > big|
|00003420| 29 20 7b 0d 09 09 20 20 | 20 20 73 2d 2d 3b 0d 09 |) {... | s--;..|
|00003430| 09 69 66 20 28 2a 73 20 | 3d 3d 20 2a 6c 69 74 74 |.if (*s |== *litt|
|00003440| 6c 65 20 26 26 20 62 63 | 6d 70 28 73 2c 6c 69 74 |le && bc|mp(s,lit|
|00003450| 74 6c 65 2c 6c 69 74 74 | 6c 65 6c 65 6e 29 3d 3d |tle,litt|lelen)==|
|00003460| 30 29 0d 09 09 20 20 20 | 20 72 65 74 75 72 6e 20 |0)... | return |
|00003470| 28 63 68 61 72 2a 29 73 | 3b 0d 09 20 20 20 20 7d |(char*)s|;.. }|
|00003480| 0d 09 20 20 20 20 72 65 | 74 75 72 6e 20 4e 75 6c |.. re|turn Nul|
|00003490| 6c 63 68 3b 0d 09 7d 0d | 20 20 20 20 7d 0d 20 20 |lch;..}.| }. |
|000034a0| 20 20 74 61 62 6c 65 20 | 3d 20 28 75 6e 73 69 67 | table |= (unsig|
|000034b0| 6e 65 64 20 63 68 61 72 | 2a 29 28 6c 69 74 74 6c |ned char|*)(littl|
|000034c0| 65 73 74 72 2d 3e 73 74 | 72 5f 70 74 72 20 2b 20 |estr->st|r_ptr + |
|000034d0| 6c 69 74 74 6c 65 6c 65 | 6e 20 2b 20 31 29 3b 0d |littlele|n + 1);.|
|000034e0| 23 65 6c 73 65 0d 20 20 | 20 20 74 61 62 6c 65 20 |#else. | table |
|000034f0| 3d 20 4e 75 6c 6c 28 75 | 6e 73 69 67 6e 65 64 20 |= Null(u|nsigned |
|00003500| 63 68 61 72 2a 29 3b 0d | 23 65 6e 64 69 66 0d 20 |char*);.|#endif. |
|00003510| 20 20 20 69 66 20 28 2d | 2d 6c 69 74 74 6c 65 6c | if (-|-littlel|
|00003520| 65 6e 20 3e 3d 20 62 69 | 67 65 6e 64 20 2d 20 62 |en >= bi|gend - b|
|00003530| 69 67 29 0d 09 72 65 74 | 75 72 6e 20 4e 75 6c 6c |ig)..ret|urn Null|
|00003540| 63 68 3b 0d 20 20 20 20 | 73 20 3d 20 62 69 67 20 |ch;. |s = big |
|00003550| 2b 20 6c 69 74 74 6c 65 | 6c 65 6e 3b 0d 20 20 20 |+ little|len;. |
|00003560| 20 6f 6c 64 6c 69 74 74 | 6c 65 20 3d 20 6c 69 74 | oldlitt|le = lit|
|00003570| 74 6c 65 20 3d 20 74 61 | 62 6c 65 20 2d 20 32 3b |tle = ta|ble - 2;|
|00003580| 0d 20 20 20 20 69 66 20 | 28 6c 69 74 74 6c 65 73 |. if |(littles|
|00003590| 74 72 2d 3e 73 74 72 5f | 70 6f 6b 20 26 20 53 50 |tr->str_|pok & SP|
|000035a0| 5f 43 41 53 45 46 4f 4c | 44 29 20 7b 09 2f 2a 20 |_CASEFOL|D) {./* |
|000035b0| 63 61 73 65 20 69 6e 73 | 65 6e 73 69 74 69 76 65 |case ins|ensitive|
|000035c0| 3f 20 2a 2f 0d 09 69 66 | 20 28 73 20 3c 20 62 69 |? */..if| (s < bi|
|000035d0| 67 65 6e 64 29 20 7b 0d | 09 20 20 74 6f 70 31 3a |gend) {.|. top1:|
|000035e0| 0d 09 20 20 20 20 2f 2a | 53 55 50 50 52 45 53 53 |.. /*|SUPPRESS|
|000035f0| 20 35 36 30 2a 2f 0d 09 | 20 20 20 20 69 66 20 28 | 560*/..| if (|
|00003600| 74 6d 70 20 3d 20 74 61 | 62 6c 65 5b 2a 73 5d 29 |tmp = ta|ble[*s])|
|00003610| 20 7b 0d 23 69 66 64 65 | 66 20 50 4f 49 4e 54 45 | {.#ifde|f POINTE|
|00003620| 52 52 49 47 4f 52 0d 09 | 09 69 66 20 28 62 69 67 |RRIGOR..|.if (big|
|00003630| 65 6e 64 20 2d 20 73 20 | 3e 20 74 6d 70 29 20 7b |end - s |> tmp) {|
|00003640| 0d 09 09 20 20 20 20 73 | 20 2b 3d 20 74 6d 70 3b |... s| += tmp;|
|00003650| 0d 09 09 20 20 20 20 67 | 6f 74 6f 20 74 6f 70 31 |... g|oto top1|
|00003660| 3b 0d 09 09 7d 0d 23 65 | 6c 73 65 0d 09 09 69 66 |;...}.#e|lse...if|
|00003670| 20 28 28 73 20 2b 3d 20 | 74 6d 70 29 20 3c 20 62 | ((s += |tmp) < b|
|00003680| 69 67 65 6e 64 29 0d 09 | 09 20 20 20 20 67 6f 74 |igend)..|. got|
|00003690| 6f 20 74 6f 70 31 3b 0d | 23 65 6e 64 69 66 0d 09 |o top1;.|#endif..|
|000036a0| 09 72 65 74 75 72 6e 20 | 4e 75 6c 6c 63 68 3b 0d |.return |Nullch;.|
|000036b0| 09 20 20 20 20 7d 0d 09 | 20 20 20 20 65 6c 73 65 |. }..| else|
|000036c0| 20 7b 0d 09 09 74 6d 70 | 20 3d 20 6c 69 74 74 6c | {...tmp| = littl|
|000036d0| 65 6c 65 6e 3b 09 2f 2a | 20 6c 65 73 73 20 65 78 |elen;./*| less ex|
|000036e0| 70 65 6e 73 69 76 65 20 | 74 68 61 6e 20 63 61 6c |pensive |than cal|
|000036f0| 6c 69 6e 67 20 73 74 72 | 6e 63 6d 70 28 29 20 2a |ling str|ncmp() *|
|00003700| 2f 0d 09 09 6f 6c 64 73 | 20 3d 20 73 3b 0d 09 09 |/...olds| = s;...|
|00003710| 77 68 69 6c 65 20 28 74 | 6d 70 2d 2d 29 20 7b 0d |while (t|mp--) {.|
|00003720| 09 09 20 20 20 20 69 66 | 20 28 2a 2d 2d 73 20 3d |.. if| (*--s =|
|00003730| 3d 20 2a 2d 2d 6c 69 74 | 74 6c 65 20 7c 7c 20 66 |= *--lit|tle || f|
|00003740| 6f 6c 64 5b 2a 73 5d 20 | 3d 3d 20 2a 6c 69 74 74 |old[*s] |== *litt|
|00003750| 6c 65 29 0d 09 09 09 63 | 6f 6e 74 69 6e 75 65 3b |le)....c|ontinue;|
|00003760| 0d 09 09 20 20 20 20 73 | 20 3d 20 6f 6c 64 73 20 |... s| = olds |
|00003770| 2b 20 31 3b 09 2f 2a 20 | 68 65 72 65 20 77 65 20 |+ 1;./* |here we |
|00003780| 70 61 79 20 74 68 65 20 | 70 72 69 63 65 20 66 6f |pay the |price fo|
|00003790| 72 20 66 61 69 6c 75 72 | 65 20 2a 2f 0d 09 09 20 |r failur|e */... |
|000037a0| 20 20 20 6c 69 74 74 6c | 65 20 3d 20 6f 6c 64 6c | littl|e = oldl|
|000037b0| 69 74 74 6c 65 3b 0d 09 | 09 20 20 20 20 69 66 20 |ittle;..|. if |
|000037c0| 28 73 20 3c 20 62 69 67 | 65 6e 64 29 09 2f 2a 20 |(s < big|end)./* |
|000037d0| 66 61 6b 65 20 75 70 20 | 63 6f 6e 74 69 6e 75 65 |fake up |continue|
|000037e0| 20 74 6f 20 6f 75 74 65 | 72 20 6c 6f 6f 70 20 2a | to oute|r loop *|
|000037f0| 2f 0d 09 09 09 67 6f 74 | 6f 20 74 6f 70 31 3b 0d |/....got|o top1;.|
|00003800| 09 09 20 20 20 20 72 65 | 74 75 72 6e 20 4e 75 6c |.. re|turn Nul|
|00003810| 6c 63 68 3b 0d 09 09 7d | 0d 23 69 66 6e 64 65 66 |lch;...}|.#ifndef|
|00003820| 20 6c 69 6e 74 0d 09 09 | 72 65 74 75 72 6e 20 28 | lint...|return (|
|00003830| 63 68 61 72 20 2a 29 73 | 3b 0d 23 65 6e 64 69 66 |char *)s|;.#endif|
|00003840| 0d 09 20 20 20 20 7d 0d | 09 7d 0d 20 20 20 20 7d |.. }.|.}. }|
|00003850| 0d 20 20 20 20 65 6c 73 | 65 20 7b 0d 09 69 66 20 |. els|e {..if |
|00003860| 28 73 20 3c 20 62 69 67 | 65 6e 64 29 20 7b 0d 09 |(s < big|end) {..|
|00003870| 20 20 74 6f 70 32 3a 0d | 09 20 20 20 20 2f 2a 53 | top2:.|. /*S|
|00003880| 55 50 50 52 45 53 53 20 | 35 36 30 2a 2f 0d 09 20 |UPPRESS |560*/.. |
|00003890| 20 20 20 69 66 20 28 74 | 6d 70 20 3d 20 74 61 62 | if (t|mp = tab|
|000038a0| 6c 65 5b 2a 73 5d 29 20 | 7b 0d 23 69 66 64 65 66 |le[*s]) |{.#ifdef|
|000038b0| 20 50 4f 49 4e 54 45 52 | 52 49 47 4f 52 0d 09 09 | POINTER|RIGOR...|
|000038c0| 69 66 20 28 62 69 67 65 | 6e 64 20 2d 20 73 20 3e |if (bige|nd - s >|
|000038d0| 20 74 6d 70 29 20 7b 0d | 09 09 20 20 20 20 73 20 | tmp) {.|.. s |
|000038e0| 2b 3d 20 74 6d 70 3b 0d | 09 09 20 20 20 20 67 6f |+= tmp;.|.. go|
|000038f0| 74 6f 20 74 6f 70 32 3b | 0d 09 09 7d 0d 23 65 6c |to top2;|...}.#el|
|00003900| 73 65 0d 09 09 69 66 20 | 28 28 73 20 2b 3d 20 74 |se...if |((s += t|
|00003910| 6d 70 29 20 3c 20 62 69 | 67 65 6e 64 29 0d 09 09 |mp) < bi|gend)...|
|00003920| 20 20 20 20 67 6f 74 6f | 20 74 6f 70 32 3b 0d 23 | goto| top2;.#|
|00003930| 65 6e 64 69 66 0d 09 09 | 72 65 74 75 72 6e 20 4e |endif...|return N|
|00003940| 75 6c 6c 63 68 3b 0d 09 | 20 20 20 20 7d 0d 09 20 |ullch;..| }.. |
|00003950| 20 20 20 65 6c 73 65 20 | 7b 0d 09 09 74 6d 70 20 | else |{...tmp |
|00003960| 3d 20 6c 69 74 74 6c 65 | 6c 65 6e 3b 09 2f 2a 20 |= little|len;./* |
|00003970| 6c 65 73 73 20 65 78 70 | 65 6e 73 69 76 65 20 74 |less exp|ensive t|
|00003980| 68 61 6e 20 63 61 6c 6c | 69 6e 67 20 73 74 72 6e |han call|ing strn|
|00003990| 63 6d 70 28 29 20 2a 2f | 0d 09 09 6f 6c 64 73 20 |cmp() */|...olds |
|000039a0| 3d 20 73 3b 0d 09 09 77 | 68 69 6c 65 20 28 74 6d |= s;...w|hile (tm|
|000039b0| 70 2d 2d 29 20 7b 0d 09 | 09 20 20 20 20 69 66 20 |p--) {..|. if |
|000039c0| 28 2a 2d 2d 73 20 3d 3d | 20 2a 2d 2d 6c 69 74 74 |(*--s ==| *--litt|
|000039d0| 6c 65 29 0d 09 09 09 63 | 6f 6e 74 69 6e 75 65 3b |le)....c|ontinue;|
|000039e0| 0d 09 09 20 20 20 20 73 | 20 3d 20 6f 6c 64 73 20 |... s| = olds |
|000039f0| 2b 20 31 3b 09 2f 2a 20 | 68 65 72 65 20 77 65 20 |+ 1;./* |here we |
|00003a00| 70 61 79 20 74 68 65 20 | 70 72 69 63 65 20 66 6f |pay the |price fo|
|00003a10| 72 20 66 61 69 6c 75 72 | 65 20 2a 2f 0d 09 09 20 |r failur|e */... |
|00003a20| 20 20 20 6c 69 74 74 6c | 65 20 3d 20 6f 6c 64 6c | littl|e = oldl|
|00003a30| 69 74 74 6c 65 3b 0d 09 | 09 20 20 20 20 69 66 20 |ittle;..|. if |
|00003a40| 28 73 20 3c 20 62 69 67 | 65 6e 64 29 09 2f 2a 20 |(s < big|end)./* |
|00003a50| 66 61 6b 65 20 75 70 20 | 63 6f 6e 74 69 6e 75 65 |fake up |continue|
|00003a60| 20 74 6f 20 6f 75 74 65 | 72 20 6c 6f 6f 70 20 2a | to oute|r loop *|
|00003a70| 2f 0d 09 09 09 67 6f 74 | 6f 20 74 6f 70 32 3b 0d |/....got|o top2;.|
|00003a80| 09 09 20 20 20 20 72 65 | 74 75 72 6e 20 4e 75 6c |.. re|turn Nul|
|00003a90| 6c 63 68 3b 0d 09 09 7d | 0d 23 69 66 6e 64 65 66 |lch;...}|.#ifndef|
|00003aa0| 20 6c 69 6e 74 0d 09 09 | 72 65 74 75 72 6e 20 28 | lint...|return (|
|00003ab0| 63 68 61 72 20 2a 29 73 | 3b 0d 23 65 6e 64 69 66 |char *)s|;.#endif|
|00003ac0| 0d 09 20 20 20 20 7d 0d | 09 7d 0d 20 20 20 20 7d |.. }.|.}. }|
|00003ad0| 0d 20 20 20 20 72 65 74 | 75 72 6e 20 4e 75 6c 6c |. ret|urn Null|
|00003ae0| 63 68 3b 0d 7d 0d 0d 63 | 68 61 72 20 2a 0d 73 63 |ch;.}..c|har *.sc|
|00003af0| 72 65 61 6d 69 6e 73 74 | 72 28 62 69 67 73 74 72 |reaminst|r(bigstr|
|00003b00| 2c 20 6c 69 74 74 6c 65 | 73 74 72 29 0d 53 54 52 |, little|str).STR|
|00003b10| 20 2a 62 69 67 73 74 72 | 3b 0d 53 54 52 20 2a 6c | *bigstr|;.STR *l|
|00003b20| 69 74 74 6c 65 73 74 72 | 3b 0d 7b 0d 20 20 20 20 |ittlestr|;.{. |
|00003b30| 72 65 67 69 73 74 65 72 | 20 75 6e 73 69 67 6e 65 |register| unsigne|
|00003b40| 64 20 63 68 61 72 20 2a | 73 2c 20 2a 78 3b 0d 20 |d char *|s, *x;. |
|00003b50| 20 20 20 72 65 67 69 73 | 74 65 72 20 75 6e 73 69 | regis|ter unsi|
|00003b60| 67 6e 65 64 20 63 68 61 | 72 20 2a 62 69 67 3b 0d |gned cha|r *big;.|
|00003b70| 20 20 20 20 72 65 67 69 | 73 74 65 72 20 69 6e 74 | regi|ster int|
|00003b80| 20 70 6f 73 3b 0d 20 20 | 20 20 72 65 67 69 73 74 | pos;. | regist|
|00003b90| 65 72 20 69 6e 74 20 70 | 72 65 76 69 6f 75 73 3b |er int p|revious;|
|00003ba0| 0d 20 20 20 20 72 65 67 | 69 73 74 65 72 20 69 6e |. reg|ister in|
|00003bb0| 74 20 66 69 72 73 74 3b | 0d 20 20 20 20 72 65 67 |t first;|. reg|
|00003bc0| 69 73 74 65 72 20 75 6e | 73 69 67 6e 65 64 20 63 |ister un|signed c|
|00003bd0| 68 61 72 20 2a 6c 69 74 | 74 6c 65 3b 0d 20 20 20 |har *lit|tle;. |
|00003be0| 20 72 65 67 69 73 74 65 | 72 20 75 6e 73 69 67 6e | registe|r unsign|
|00003bf0| 65 64 20 63 68 61 72 20 | 2a 62 69 67 65 6e 64 3b |ed char |*bigend;|
|00003c00| 0d 20 20 20 20 72 65 67 | 69 73 74 65 72 20 75 6e |. reg|ister un|
|00003c10| 73 69 67 6e 65 64 20 63 | 68 61 72 20 2a 6c 69 74 |signed c|har *lit|
|00003c20| 74 6c 65 65 6e 64 3b 0d | 0d 20 20 20 20 69 66 20 |tleend;.|. if |
|00003c30| 28 28 70 6f 73 20 3d 20 | 73 63 72 65 61 6d 66 69 |((pos = |screamfi|
|00003c40| 72 73 74 5b 6c 69 74 74 | 6c 65 73 74 72 2d 3e 73 |rst[litt|lestr->s|
|00003c50| 74 72 5f 72 61 72 65 5d | 29 20 3c 20 30 29 20 0d |tr_rare]|) < 0) .|
|00003c60| 09 72 65 74 75 72 6e 20 | 4e 75 6c 6c 63 68 3b 0d |.return |Nullch;.|
|00003c70| 23 69 66 6e 64 65 66 20 | 6c 69 6e 74 0d 20 20 20 |#ifndef |lint. |
|00003c80| 20 6c 69 74 74 6c 65 20 | 3d 20 28 75 6e 73 69 67 | little |= (unsig|
|00003c90| 6e 65 64 20 63 68 61 72 | 20 2a 29 28 6c 69 74 74 |ned char| *)(litt|
|00003ca0| 6c 65 73 74 72 2d 3e 73 | 74 72 5f 70 74 72 29 3b |lestr->s|tr_ptr);|
|00003cb0| 0d 23 65 6c 73 65 0d 20 | 20 20 20 6c 69 74 74 6c |.#else. | littl|
|00003cc0| 65 20 3d 20 4e 75 6c 6c | 28 75 6e 73 69 67 6e 65 |e = Null|(unsigne|
|00003cd0| 64 20 63 68 61 72 20 2a | 29 3b 0d 23 65 6e 64 69 |d char *|);.#endi|
|00003ce0| 66 0d 20 20 20 20 6c 69 | 74 74 6c 65 65 6e 64 20 |f. li|ttleend |
|00003cf0| 3d 20 6c 69 74 74 6c 65 | 20 2b 20 6c 69 74 74 6c |= little| + littl|
|00003d00| 65 73 74 72 2d 3e 73 74 | 72 5f 63 75 72 3b 0d 20 |estr->st|r_cur;. |
|00003d10| 20 20 20 66 69 72 73 74 | 20 3d 20 2a 6c 69 74 74 | first| = *litt|
|00003d20| 6c 65 2b 2b 3b 0d 20 20 | 20 20 70 72 65 76 69 6f |le++;. | previo|
|00003d30| 75 73 20 3d 20 6c 69 74 | 74 6c 65 73 74 72 2d 3e |us = lit|tlestr->|
|00003d40| 73 74 72 5f 73 74 61 74 | 65 3b 0d 23 69 66 6e 64 |str_stat|e;.#ifnd|
|00003d50| 65 66 20 6c 69 6e 74 0d | 20 20 20 20 62 69 67 20 |ef lint.| big |
|00003d60| 3d 20 28 75 6e 73 69 67 | 6e 65 64 20 63 68 61 72 |= (unsig|ned char|
|00003d70| 20 2a 29 28 62 69 67 73 | 74 72 2d 3e 73 74 72 5f | *)(bigs|tr->str_|
|00003d80| 70 74 72 29 3b 0d 23 65 | 6c 73 65 0d 20 20 20 20 |ptr);.#e|lse. |
|00003d90| 62 69 67 20 3d 20 4e 75 | 6c 6c 28 75 6e 73 69 67 |big = Nu|ll(unsig|
|00003da0| 6e 65 64 20 63 68 61 72 | 2a 29 3b 0d 23 65 6e 64 |ned char|*);.#end|
|00003db0| 69 66 0d 20 20 20 20 62 | 69 67 65 6e 64 20 3d 20 |if. b|igend = |
|00003dc0| 62 69 67 20 2b 20 62 69 | 67 73 74 72 2d 3e 73 74 |big + bi|gstr->st|
|00003dd0| 72 5f 63 75 72 3b 0d 20 | 20 20 20 77 68 69 6c 65 |r_cur;. | while|
|00003de0| 20 28 70 6f 73 20 3c 20 | 70 72 65 76 69 6f 75 73 | (pos < |previous|
|00003df0| 29 20 7b 0d 23 69 66 6e | 64 65 66 20 6c 69 6e 74 |) {.#ifn|def lint|
|00003e00| 0d 09 69 66 20 28 21 28 | 70 6f 73 20 2b 3d 20 73 |..if (!(|pos += s|
|00003e10| 63 72 65 61 6d 6e 65 78 | 74 5b 70 6f 73 5d 29 29 |creamnex|t[pos]))|
|00003e20| 0d 23 65 6e 64 69 66 0d | 09 20 20 20 20 72 65 74 |.#endif.|. ret|
|00003e30| 75 72 6e 20 4e 75 6c 6c | 63 68 3b 0d 20 20 20 20 |urn Null|ch;. |
|00003e40| 7d 0d 23 69 66 64 65 66 | 20 50 4f 49 4e 54 45 52 |}.#ifdef| POINTER|
|00003e50| 52 49 47 4f 52 0d 20 20 | 20 20 69 66 20 28 6c 69 |RIGOR. | if (li|
|00003e60| 74 74 6c 65 73 74 72 2d | 3e 73 74 72 5f 70 6f 6b |ttlestr-|>str_pok|
|00003e70| 20 26 20 53 50 5f 43 41 | 53 45 46 4f 4c 44 29 20 | & SP_CA|SEFOLD) |
|00003e80| 7b 09 2f 2a 20 63 61 73 | 65 20 69 6e 73 69 67 6e |{./* cas|e insign|
|00003e90| 69 66 69 63 61 6e 74 3f | 20 2a 2f 0d 09 64 6f 20 |ificant?| */..do |
|00003ea0| 7b 0d 09 20 20 20 20 69 | 66 20 28 62 69 67 5b 70 |{.. i|f (big[p|
|00003eb0| 6f 73 2d 70 72 65 76 69 | 6f 75 73 5d 20 21 3d 20 |os-previ|ous] != |
|00003ec0| 66 69 72 73 74 20 26 26 | 20 62 69 67 5b 70 6f 73 |first &&| big[pos|
|00003ed0| 2d 70 72 65 76 69 6f 75 | 73 5d 20 21 3d 20 66 6f |-previou|s] != fo|
|00003ee0| 6c 64 5b 66 69 72 73 74 | 5d 29 0d 09 09 63 6f 6e |ld[first|])...con|
|00003ef0| 74 69 6e 75 65 3b 0d 09 | 20 20 20 20 66 6f 72 20 |tinue;..| for |
|00003f00| 28 78 3d 62 69 67 2b 70 | 6f 73 2b 31 2d 70 72 65 |(x=big+p|os+1-pre|
|00003f10| 76 69 6f 75 73 2c 73 3d | 6c 69 74 74 6c 65 3b 20 |vious,s=|little; |
|00003f20| 73 20 3c 20 6c 69 74 74 | 6c 65 65 6e 64 3b 20 2f |s < litt|leend; /|
|00003f30| 2a 2a 2f 20 29 20 7b 0d | 09 09 69 66 20 28 78 20 |**/ ) {.|..if (x |
|00003f40| 3e 3d 20 62 69 67 65 6e | 64 29 0d 09 09 20 20 20 |>= bigen|d)... |
|00003f50| 20 72 65 74 75 72 6e 20 | 4e 75 6c 6c 63 68 3b 0d | return |Nullch;.|
|00003f60| 09 09 69 66 20 28 2a 73 | 2b 2b 20 21 3d 20 2a 78 |..if (*s|++ != *x|
|00003f70| 2b 2b 20 26 26 20 66 6f | 6c 64 5b 2a 28 73 2d 31 |++ && fo|ld[*(s-1|
|00003f80| 29 5d 20 21 3d 20 2a 28 | 78 2d 31 29 29 20 7b 0d |)] != *(|x-1)) {.|
|00003f90| 09 09 20 20 20 20 73 2d | 2d 3b 0d 09 09 20 20 20 |.. s-|-;... |
|00003fa0| 20 62 72 65 61 6b 3b 0d | 09 09 7d 0d 09 20 20 20 | break;.|..}.. |
|00003fb0| 20 7d 0d 09 20 20 20 20 | 69 66 20 28 73 20 3d 3d | }.. |if (s ==|
|00003fc0| 20 6c 69 74 74 6c 65 65 | 6e 64 29 0d 23 69 66 6e | littlee|nd).#ifn|
|00003fd0| 64 65 66 20 6c 69 6e 74 | 0d 09 09 72 65 74 75 72 |def lint|...retur|
|00003fe0| 6e 20 28 63 68 61 72 20 | 2a 29 28 62 69 67 2b 70 |n (char |*)(big+p|
|00003ff0| 6f 73 2d 70 72 65 76 69 | 6f 75 73 29 3b 0d 23 65 |os-previ|ous);.#e|
|00004000| 6c 73 65 0d 09 09 72 65 | 74 75 72 6e 20 4e 75 6c |lse...re|turn Nul|
|00004010| 6c 63 68 3b 0d 23 65 6e | 64 69 66 0d 09 7d 20 77 |lch;.#en|dif..} w|
|00004020| 68 69 6c 65 20 28 0d 23 | 69 66 6e 64 65 66 20 6c |hile (.#|ifndef l|
|00004030| 69 6e 74 0d 09 09 70 6f | 73 20 2b 3d 20 73 63 72 |int...po|s += scr|
|00004040| 65 61 6d 6e 65 78 74 5b | 70 6f 73 5d 09 2f 2a 20 |eamnext[|pos]./* |
|00004050| 64 6f 65 73 20 74 68 69 | 73 20 67 6f 6f 66 20 75 |does thi|s goof u|
|00004060| 70 20 61 6e 79 77 68 65 | 72 65 3f 20 2a 2f 0d 23 |p anywhe|re? */.#|
|00004070| 65 6c 73 65 0d 09 09 70 | 6f 73 20 2b 3d 20 73 63 |else...p|os += sc|
|00004080| 72 65 61 6d 6e 65 78 74 | 5b 30 5d 0d 23 65 6e 64 |reamnext|[0].#end|
|00004090| 69 66 0d 09 20 20 20 20 | 29 3b 0d 20 20 20 20 7d |if.. |);. }|
|000040a0| 0d 20 20 20 20 65 6c 73 | 65 20 7b 0d 09 64 6f 20 |. els|e {..do |
|000040b0| 7b 0d 09 20 20 20 20 69 | 66 20 28 62 69 67 5b 70 |{.. i|f (big[p|
|000040c0| 6f 73 2d 70 72 65 76 69 | 6f 75 73 5d 20 21 3d 20 |os-previ|ous] != |
|000040d0| 66 69 72 73 74 29 0d 09 | 09 63 6f 6e 74 69 6e 75 |first)..|.continu|
|000040e0| 65 3b 0d 09 20 20 20 20 | 66 6f 72 20 28 78 3d 62 |e;.. |for (x=b|
|000040f0| 69 67 2b 70 6f 73 2b 31 | 2d 70 72 65 76 69 6f 75 |ig+pos+1|-previou|
|00004100| 73 2c 73 3d 6c 69 74 74 | 6c 65 3b 20 73 20 3c 20 |s,s=litt|le; s < |
|00004110| 6c 69 74 74 6c 65 65 6e | 64 3b 20 2f 2a 2a 2f 20 |littleen|d; /**/ |
|00004120| 29 20 7b 0d 09 09 69 66 | 20 28 78 20 3e 3d 20 62 |) {...if| (x >= b|
|00004130| 69 67 65 6e 64 29 0d 09 | 09 20 20 20 20 72 65 74 |igend)..|. ret|
|00004140| 75 72 6e 20 4e 75 6c 6c | 63 68 3b 0d 09 09 69 66 |urn Null|ch;...if|
|00004150| 20 28 2a 73 2b 2b 20 21 | 3d 20 2a 78 2b 2b 29 20 | (*s++ !|= *x++) |
|00004160| 7b 0d 09 09 20 20 20 20 | 73 2d 2d 3b 0d 09 09 20 |{... |s--;... |
|00004170| 20 20 20 62 72 65 61 6b | 3b 0d 09 09 7d 0d 09 20 | break|;...}.. |
|00004180| 20 20 20 7d 0d 09 20 20 | 20 20 69 66 20 28 73 20 | }.. | if (s |
|00004190| 3d 3d 20 6c 69 74 74 6c | 65 65 6e 64 29 0d 23 69 |== littl|eend).#i|
|000041a0| 66 6e 64 65 66 20 6c 69 | 6e 74 0d 09 09 72 65 74 |fndef li|nt...ret|
|000041b0| 75 72 6e 20 28 63 68 61 | 72 20 2a 29 28 62 69 67 |urn (cha|r *)(big|
|000041c0| 2b 70 6f 73 2d 70 72 65 | 76 69 6f 75 73 29 3b 0d |+pos-pre|vious);.|
|000041d0| 23 65 6c 73 65 0d 09 09 | 72 65 74 75 72 6e 20 4e |#else...|return N|
|000041e0| 75 6c 6c 63 68 3b 0d 23 | 65 6e 64 69 66 0d 09 7d |ullch;.#|endif..}|
|000041f0| 20 77 68 69 6c 65 20 28 | 0d 23 69 66 6e 64 65 66 | while (|.#ifndef|
|00004200| 20 6c 69 6e 74 0d 09 09 | 70 6f 73 20 2b 3d 20 73 | lint...|pos += s|
|00004210| 63 72 65 61 6d 6e 65 78 | 74 5b 70 6f 73 5d 0d 23 |creamnex|t[pos].#|
|00004220| 65 6c 73 65 0d 09 09 70 | 6f 73 20 2b 3d 20 73 63 |else...p|os += sc|
|00004230| 72 65 61 6d 6e 65 78 74 | 5b 30 5d 0d 23 65 6e 64 |reamnext|[0].#end|
|00004240| 69 66 0d 09 20 20 20 20 | 29 3b 0d 20 20 20 20 7d |if.. |);. }|
|00004250| 0d 23 65 6c 73 65 20 2f | 2a 20 21 50 4f 49 4e 54 |.#else /|* !POINT|
|00004260| 45 52 52 49 47 4f 52 20 | 2a 2f 0d 20 20 20 20 62 |ERRIGOR |*/. b|
|00004270| 69 67 20 2d 3d 20 70 72 | 65 76 69 6f 75 73 3b 0d |ig -= pr|evious;.|
|00004280| 20 20 20 20 69 66 20 28 | 6c 69 74 74 6c 65 73 74 | if (|littlest|
|00004290| 72 2d 3e 73 74 72 5f 70 | 6f 6b 20 26 20 53 50 5f |r->str_p|ok & SP_|
|000042a0| 43 41 53 45 46 4f 4c 44 | 29 20 7b 09 2f 2a 20 63 |CASEFOLD|) {./* c|
|000042b0| 61 73 65 20 69 6e 73 69 | 67 6e 69 66 69 63 61 6e |ase insi|gnifican|
|000042c0| 74 3f 20 2a 2f 0d 09 64 | 6f 20 7b 0d 09 20 20 20 |t? */..d|o {.. |
|000042d0| 20 69 66 20 28 62 69 67 | 5b 70 6f 73 5d 20 21 3d | if (big|[pos] !=|
|000042e0| 20 66 69 72 73 74 20 26 | 26 20 62 69 67 5b 70 6f | first &|& big[po|
|000042f0| 73 5d 20 21 3d 20 66 6f | 6c 64 5b 66 69 72 73 74 |s] != fo|ld[first|
|00004300| 5d 29 0d 09 09 63 6f 6e | 74 69 6e 75 65 3b 0d 09 |])...con|tinue;..|
|00004310| 20 20 20 20 66 6f 72 20 | 28 78 3d 62 69 67 2b 70 | for |(x=big+p|
|00004320| 6f 73 2b 31 2c 73 3d 6c | 69 74 74 6c 65 3b 20 73 |os+1,s=l|ittle; s|
|00004330| 20 3c 20 6c 69 74 74 6c | 65 65 6e 64 3b 20 2f 2a | < littl|eend; /*|
|00004340| 2a 2f 20 29 20 7b 0d 09 | 09 69 66 20 28 78 20 3e |*/ ) {..|.if (x >|
|00004350| 3d 20 62 69 67 65 6e 64 | 29 0d 09 09 20 20 20 20 |= bigend|)... |
|00004360| 72 65 74 75 72 6e 20 4e | 75 6c 6c 63 68 3b 0d 09 |return N|ullch;..|
|00004370| 09 69 66 20 28 2a 73 2b | 2b 20 21 3d 20 2a 78 2b |.if (*s+|+ != *x+|
|00004380| 2b 20 26 26 20 66 6f 6c | 64 5b 2a 28 73 2d 31 29 |+ && fol|d[*(s-1)|
|00004390| 5d 20 21 3d 20 2a 28 78 | 2d 31 29 29 20 7b 0d 09 |] != *(x|-1)) {..|
|000043a0| 09 20 20 20 20 73 2d 2d | 3b 0d 09 09 20 20 20 20 |. s--|;... |
|000043b0| 62 72 65 61 6b 3b 0d 09 | 09 7d 0d 09 20 20 20 20 |break;..|.}.. |
|000043c0| 7d 0d 09 20 20 20 20 69 | 66 20 28 73 20 3d 3d 20 |}.. i|f (s == |
|000043d0| 6c 69 74 74 6c 65 65 6e | 64 29 0d 23 69 66 6e 64 |littleen|d).#ifnd|
|000043e0| 65 66 20 6c 69 6e 74 0d | 09 09 72 65 74 75 72 6e |ef lint.|..return|
|000043f0| 20 28 63 68 61 72 20 2a | 29 28 62 69 67 2b 70 6f | (char *|)(big+po|
|00004400| 73 29 3b 0d 23 65 6c 73 | 65 0d 09 09 72 65 74 75 |s);.#els|e...retu|
|00004410| 72 6e 20 4e 75 6c 6c 63 | 68 3b 0d 23 65 6e 64 69 |rn Nullc|h;.#endi|
|00004420| 66 0d 09 7d 20 77 68 69 | 6c 65 20 28 0d 23 69 66 |f..} whi|le (.#if|
|00004430| 6e 64 65 66 20 6c 69 6e | 74 0d 09 09 70 6f 73 20 |ndef lin|t...pos |
|00004440| 2b 3d 20 73 63 72 65 61 | 6d 6e 65 78 74 5b 70 6f |+= screa|mnext[po|
|00004450| 73 5d 09 2f 2a 20 64 6f | 65 73 20 74 68 69 73 20 |s]./* do|es this |
|00004460| 67 6f 6f 66 20 75 70 20 | 61 6e 79 77 68 65 72 65 |goof up |anywhere|
|00004470| 3f 20 2a 2f 0d 23 65 6c | 73 65 0d 09 09 70 6f 73 |? */.#el|se...pos|
|00004480| 20 2b 3d 20 73 63 72 65 | 61 6d 6e 65 78 74 5b 30 | += scre|amnext[0|
|00004490| 5d 0d 23 65 6e 64 69 66 | 0d 09 20 20 20 20 29 3b |].#endif|.. );|
|000044a0| 0d 20 20 20 20 7d 0d 20 | 20 20 20 65 6c 73 65 20 |. }. | else |
|000044b0| 7b 0d 09 64 6f 20 7b 0d | 09 20 20 20 20 69 66 20 |{..do {.|. if |
|000044c0| 28 62 69 67 5b 70 6f 73 | 5d 20 21 3d 20 66 69 72 |(big[pos|] != fir|
|000044d0| 73 74 29 0d 09 09 63 6f | 6e 74 69 6e 75 65 3b 0d |st)...co|ntinue;.|
|000044e0| 09 20 20 20 20 66 6f 72 | 20 28 78 3d 62 69 67 2b |. for| (x=big+|
|000044f0| 70 6f 73 2b 31 2c 73 3d | 6c 69 74 74 6c 65 3b 20 |pos+1,s=|little; |
|00004500| 73 20 3c 20 6c 69 74 74 | 6c 65 65 6e 64 3b 20 2f |s < litt|leend; /|
|00004510| 2a 2a 2f 20 29 20 7b 0d | 09 09 69 66 20 28 78 20 |**/ ) {.|..if (x |
|00004520| 3e 3d 20 62 69 67 65 6e | 64 29 0d 09 09 20 20 20 |>= bigen|d)... |
|00004530| 20 72 65 74 75 72 6e 20 | 4e 75 6c 6c 63 68 3b 0d | return |Nullch;.|
|00004540| 09 09 69 66 20 28 2a 73 | 2b 2b 20 21 3d 20 2a 78 |..if (*s|++ != *x|
|00004550| 2b 2b 29 20 7b 0d 09 09 | 20 20 20 20 73 2d 2d 3b |++) {...| s--;|
|00004560| 0d 09 09 20 20 20 20 62 | 72 65 61 6b 3b 0d 09 09 |... b|reak;...|
|00004570| 7d 0d 09 20 20 20 20 7d | 0d 09 20 20 20 20 69 66 |}.. }|.. if|
|00004580| 20 28 73 20 3d 3d 20 6c | 69 74 74 6c 65 65 6e 64 | (s == l|ittleend|
|00004590| 29 0d 23 69 66 6e 64 65 | 66 20 6c 69 6e 74 0d 09 |).#ifnde|f lint..|
|000045a0| 09 72 65 74 75 72 6e 20 | 28 63 68 61 72 20 2a 29 |.return |(char *)|
|000045b0| 28 62 69 67 2b 70 6f 73 | 29 3b 0d 23 65 6c 73 65 |(big+pos|);.#else|
|000045c0| 0d 09 09 72 65 74 75 72 | 6e 20 4e 75 6c 6c 63 68 |...retur|n Nullch|
|000045d0| 3b 0d 23 65 6e 64 69 66 | 0d 09 7d 20 77 68 69 6c |;.#endif|..} whil|
|000045e0| 65 20 28 0d 23 69 66 6e | 64 65 66 20 6c 69 6e 74 |e (.#ifn|def lint|
|000045f0| 0d 09 09 70 6f 73 20 2b | 3d 20 73 63 72 65 61 6d |...pos +|= scream|
|00004600| 6e 65 78 74 5b 70 6f 73 | 5d 0d 23 65 6c 73 65 0d |next[pos|].#else.|
|00004610| 09 09 70 6f 73 20 2b 3d | 20 73 63 72 65 61 6d 6e |..pos +=| screamn|
|00004620| 65 78 74 5b 30 5d 0d 23 | 65 6e 64 69 66 0d 09 20 |ext[0].#|endif.. |
|00004630| 20 20 20 29 3b 0d 20 20 | 20 20 7d 0d 23 65 6e 64 | );. | }.#end|
|00004640| 69 66 20 2f 2a 20 50 4f | 49 4e 54 45 52 52 49 47 |if /* PO|INTERRIG|
|00004650| 4f 52 20 2a 2f 0d 20 20 | 20 20 72 65 74 75 72 6e |OR */. | return|
|00004660| 20 4e 75 6c 6c 63 68 3b | 0d 7d 0d 0d 2f 2a 20 63 | Nullch;|.}../* c|
|00004670| 6f 70 79 20 61 20 73 74 | 72 69 6e 67 20 74 6f 20 |opy a st|ring to |
|00004680| 61 20 73 61 66 65 20 73 | 70 6f 74 20 2a 2f 0d 0d |a safe s|pot */..|
|00004690| 63 68 61 72 20 2a 0d 73 | 61 76 65 73 74 72 28 73 |char *.s|avestr(s|
|000046a0| 74 72 29 0d 63 68 61 72 | 20 2a 73 74 72 3b 0d 7b |tr).char| *str;.{|
|000046b0| 0d 20 20 20 20 72 65 67 | 69 73 74 65 72 20 63 68 |. reg|ister ch|
|000046c0| 61 72 20 2a 6e 65 77 61 | 64 64 72 3b 0d 0d 20 20 |ar *newa|ddr;.. |
|000046d0| 20 20 4e 65 77 28 39 30 | 32 2c 6e 65 77 61 64 64 | New(90|2,newadd|
|000046e0| 72 2c 73 74 72 6c 65 6e | 28 73 74 72 29 2b 31 2c |r,strlen|(str)+1,|
|000046f0| 63 68 61 72 29 3b 0d 20 | 20 20 20 28 76 6f 69 64 |char);. | (void|
|00004700| 29 73 74 72 63 70 79 28 | 6e 65 77 61 64 64 72 2c |)strcpy(|newaddr,|
|00004710| 73 74 72 29 3b 0d 20 20 | 20 20 72 65 74 75 72 6e |str);. | return|
|00004720| 20 6e 65 77 61 64 64 72 | 3b 0d 7d 0d 0d 2f 2a 20 | newaddr|;.}../* |
|00004730| 73 61 6d 65 20 74 68 69 | 6e 67 20 62 75 74 20 77 |same thi|ng but w|
|00004740| 69 74 68 20 61 20 6b 6e | 6f 77 6e 20 6c 65 6e 67 |ith a kn|own leng|
|00004750| 74 68 20 2a 2f 0d 0d 63 | 68 61 72 20 2a 0d 6e 73 |th */..c|har *.ns|
|00004760| 61 76 65 73 74 72 28 73 | 74 72 2c 20 6c 65 6e 29 |avestr(s|tr, len)|
|00004770| 0d 63 68 61 72 20 2a 73 | 74 72 3b 0d 72 65 67 69 |.char *s|tr;.regi|
|00004780| 73 74 65 72 20 69 6e 74 | 20 6c 65 6e 3b 0d 7b 0d |ster int| len;.{.|
|00004790| 20 20 20 20 72 65 67 69 | 73 74 65 72 20 63 68 61 | regi|ster cha|
|000047a0| 72 20 2a 6e 65 77 61 64 | 64 72 3b 0d 0d 20 20 20 |r *newad|dr;.. |
|000047b0| 20 4e 65 77 28 39 30 33 | 2c 6e 65 77 61 64 64 72 | New(903|,newaddr|
|000047c0| 2c 6c 65 6e 2b 31 2c 63 | 68 61 72 29 3b 0d 20 20 |,len+1,c|har);. |
|000047d0| 20 20 43 6f 70 79 28 73 | 74 72 2c 6e 65 77 61 64 | Copy(s|tr,newad|
|000047e0| 64 72 2c 6c 65 6e 2c 63 | 68 61 72 29 3b 09 09 2f |dr,len,c|har);../|
|000047f0| 2a 20 6d 69 67 68 74 20 | 6e 6f 74 20 62 65 20 6e |* might |not be n|
|00004800| 75 6c 6c 20 74 65 72 6d | 69 6e 61 74 65 64 20 2a |ull term|inated *|
|00004810| 2f 0d 20 20 20 20 6e 65 | 77 61 64 64 72 5b 6c 65 |/. ne|waddr[le|
|00004820| 6e 5d 20 3d 20 27 5c 30 | 27 3b 09 09 2f 2a 20 69 |n] = '\0|';../* i|
|00004830| 73 20 6e 6f 77 20 2a 2f | 0d 20 20 20 20 72 65 74 |s now */|. ret|
|00004840| 75 72 6e 20 6e 65 77 61 | 64 64 72 3b 0d 7d 0d 0d |urn newa|ddr;.}..|
|00004850| 2f 2a 20 67 72 6f 77 20 | 61 20 73 74 61 74 69 63 |/* grow |a static|
|00004860| 20 73 74 72 69 6e 67 20 | 74 6f 20 61 74 20 6c 65 | string |to at le|
|00004870| 61 73 74 20 61 20 63 65 | 72 74 61 69 6e 20 6c 65 |ast a ce|rtain le|
|00004880| 6e 67 74 68 20 2a 2f 0d | 0d 76 6f 69 64 0d 67 72 |ngth */.|.void.gr|
|00004890| 6f 77 73 74 72 28 73 74 | 72 70 74 72 2c 63 75 72 |owstr(st|rptr,cur|
|000048a0| 6c 65 6e 2c 6e 65 77 6c | 65 6e 29 0d 63 68 61 72 |len,newl|en).char|
|000048b0| 20 2a 2a 73 74 72 70 74 | 72 3b 0d 69 6e 74 20 2a | **strpt|r;.int *|
|000048c0| 63 75 72 6c 65 6e 3b 0d | 69 6e 74 20 6e 65 77 6c |curlen;.|int newl|
|000048d0| 65 6e 3b 0d 7b 0d 20 20 | 20 20 69 66 20 28 6e 65 |en;.{. | if (ne|
|000048e0| 77 6c 65 6e 20 3e 20 2a | 63 75 72 6c 65 6e 29 20 |wlen > *|curlen) |
|000048f0| 7b 09 09 2f 2a 20 6e 65 | 65 64 20 6d 6f 72 65 20 |{../* ne|ed more |
|00004900| 72 6f 6f 6d 3f 20 2a 2f | 0d 09 69 66 20 28 2a 63 |room? */|..if (*c|
|00004910| 75 72 6c 65 6e 29 0d 09 | 20 20 20 20 52 65 6e 65 |urlen)..| Rene|
|00004920| 77 28 2a 73 74 72 70 74 | 72 2c 6e 65 77 6c 65 6e |w(*strpt|r,newlen|
|00004930| 2c 63 68 61 72 29 3b 0d | 09 65 6c 73 65 0d 09 20 |,char);.|.else.. |
|00004940| 20 20 20 4e 65 77 28 39 | 30 35 2c 2a 73 74 72 70 | New(9|05,*strp|
|00004950| 74 72 2c 6e 65 77 6c 65 | 6e 2c 63 68 61 72 29 3b |tr,newle|n,char);|
|00004960| 0d 09 2a 63 75 72 6c 65 | 6e 20 3d 20 6e 65 77 6c |..*curle|n = newl|
|00004970| 65 6e 3b 0d 20 20 20 20 | 7d 0d 7d 0d 0d 23 69 66 |en;. |}.}..#if|
|00004980| 6e 64 65 66 20 49 5f 56 | 41 52 41 52 47 53 0d 2f |ndef I_V|ARARGS./|
|00004990| 2a 56 41 52 41 52 47 53 | 31 2a 2f 0d 63 68 61 72 |*VARARGS|1*/.char|
|000049a0| 20 2a 0d 6d 65 73 73 28 | 70 61 74 2c 61 31 2c 61 | *.mess(|pat,a1,a|
|000049b0| 32 2c 61 33 2c 61 34 29 | 0d 63 68 61 72 20 2a 70 |2,a3,a4)|.char *p|
|000049c0| 61 74 3b 0d 6c 6f 6e 67 | 20 61 31 2c 20 61 32 2c |at;.long| a1, a2,|
|000049d0| 20 61 33 2c 20 61 34 3b | 0d 7b 0d 20 20 20 20 63 | a3, a4;|.{. c|
|000049e0| 68 61 72 20 2a 73 3b 0d | 20 20 20 20 69 6e 74 20 |har *s;.| int |
|000049f0| 75 73 65 72 6d 65 73 73 | 20 3d 20 73 74 72 45 51 |usermess| = strEQ|
|00004a00| 28 70 61 74 2c 22 25 73 | 22 29 3b 0d 20 20 20 20 |(pat,"%s|");. |
|00004a10| 53 54 52 20 2a 74 6d 70 | 73 74 72 3b 0d 0d 20 20 |STR *tmp|str;.. |
|00004a20| 20 20 73 20 3d 20 62 75 | 66 3b 0d 23 69 66 64 65 | s = bu|f;.#ifde|
|00004a30| 66 20 6d 61 63 69 6e 74 | 6f 73 68 0d 20 20 20 20 |f macint|osh. |
|00004a40| 69 66 20 28 75 73 65 72 | 6d 65 73 73 29 20 7b 0d |if (user|mess) {.|
|00004a50| 09 74 6d 70 73 74 72 20 | 3d 20 73 74 72 5f 6d 6f |.tmpstr |= str_mo|
|00004a60| 72 74 61 6c 28 26 73 74 | 72 5f 75 6e 64 65 66 29 |rtal(&st|r_undef)|
|00004a70| 3b 0d 09 73 74 72 5f 73 | 65 74 28 74 6d 70 73 74 |;..str_s|et(tmpst|
|00004a80| 72 2c 20 22 23 20 22 29 | 3b 0d 09 73 74 72 5f 63 |r, "# ")|;..str_c|
|00004a90| 61 74 28 74 6d 70 73 74 | 72 2c 20 28 63 68 61 72 |at(tmpst|r, (char|
|00004aa0| 2a 29 61 31 29 3b 0d 09 | 2a 73 2b 2b 20 3d 20 74 |*)a1);..|*s++ = t|
|00004ab0| 6d 70 73 74 72 2d 3e 73 | 74 72 5f 70 74 72 5b 74 |mpstr->s|tr_ptr[t|
|00004ac0| 6d 70 73 74 72 2d 3e 73 | 74 72 5f 63 75 72 2d 31 |mpstr->s|tr_cur-1|
|00004ad0| 5d 3b 0d 20 20 20 20 7d | 0d 20 20 20 20 65 6c 73 |];. }|. els|
|00004ae0| 65 20 7b 0d 20 20 20 20 | 09 28 76 6f 69 64 29 20 |e {. |.(void) |
|00004af0| 73 70 72 69 6e 74 66 28 | 62 75 66 2c 20 22 23 20 |sprintf(|buf, "# |
|00004b00| 22 29 3b 0d 20 20 20 20 | 09 73 20 2b 3d 20 32 3b |");. |.s += 2;|
|00004b10| 0d 09 28 76 6f 69 64 29 | 73 70 72 69 6e 74 66 28 |..(void)|sprintf(|
|00004b20| 73 2c 70 61 74 2c 61 31 | 2c 61 32 2c 61 33 2c 61 |s,pat,a1|,a2,a3,a|
|00004b30| 34 29 3b 0d 09 73 20 2b | 3d 20 73 74 72 6c 65 6e |4);..s +|= strlen|
|00004b40| 28 73 29 3b 0d 20 20 20 | 20 7d 0d 23 65 6c 73 65 |(s);. | }.#else|
|00004b50| 0d 20 20 20 20 69 66 20 | 28 75 73 65 72 6d 65 73 |. if |(usermes|
|00004b60| 73 29 20 7b 0d 09 74 6d | 70 73 74 72 20 3d 20 73 |s) {..tm|pstr = s|
|00004b70| 74 72 5f 6d 6f 72 74 61 | 6c 28 26 73 74 72 5f 75 |tr_morta|l(&str_u|
|00004b80| 6e 64 65 66 29 3b 0d 09 | 73 74 72 5f 73 65 74 28 |ndef);..|str_set(|
|00004b90| 74 6d 70 73 74 72 2c 20 | 28 63 68 61 72 2a 29 61 |tmpstr, |(char*)a|
|00004ba0| 31 29 3b 0d 09 2a 73 2b | 2b 20 3d 20 74 6d 70 73 |1);..*s+|+ = tmps|
|00004bb0| 74 72 2d 3e 73 74 72 5f | 70 74 72 5b 74 6d 70 73 |tr->str_|ptr[tmps|
|00004bc0| 74 72 2d 3e 73 74 72 5f | 63 75 72 2d 31 5d 3b 0d |tr->str_|cur-1];.|
|00004bd0| 20 20 20 20 7d 0d 20 20 | 20 20 65 6c 73 65 20 7b | }. | else {|
|00004be0| 0d 09 28 76 6f 69 64 29 | 73 70 72 69 6e 74 66 28 |..(void)|sprintf(|
|00004bf0| 73 2c 70 61 74 2c 61 31 | 2c 61 32 2c 61 33 2c 61 |s,pat,a1|,a2,a3,a|
|00004c00| 34 29 3b 0d 09 73 20 2b | 3d 20 73 74 72 6c 65 6e |4);..s +|= strlen|
|00004c10| 28 73 29 3b 0d 20 20 20 | 20 7d 0d 23 65 6e 64 69 |(s);. | }.#endi|
|00004c20| 66 0d 0d 20 20 20 20 69 | 66 20 28 73 5b 2d 31 5d |f.. i|f (s[-1]|
|00004c30| 20 21 3d 20 27 5c 6e 27 | 29 20 7b 0d 23 69 66 64 | != '\n'|) {.#ifd|
|00004c40| 65 66 20 6d 61 63 69 6e | 74 6f 73 68 0d 09 69 66 |ef macin|tosh..if|
|00004c50| 20 28 6c 61 73 74 5f 69 | 6e 5f 73 74 61 62 20 26 | (last_i|n_stab &|
|00004c60| 26 0d 09 20 20 20 20 73 | 74 61 62 5f 69 6f 28 6c |&.. s|tab_io(l|
|00004c70| 61 73 74 5f 69 6e 5f 73 | 74 61 62 29 20 26 26 0d |ast_in_s|tab) &&.|
|00004c80| 09 20 20 20 20 73 74 61 | 62 5f 69 6f 28 6c 61 73 |. sta|b_io(las|
|00004c90| 74 5f 69 6e 5f 73 74 61 | 62 29 2d 3e 6c 69 6e 65 |t_in_sta|b)->line|
|00004ca0| 73 20 29 20 7b 0d 09 20 | 20 20 20 69 66 20 28 73 |s ) {.. | if (s|
|00004cb0| 5b 2d 31 5d 20 21 3d 20 | 27 2e 27 29 0d 09 20 20 |[-1] != |'.').. |
|00004cc0| 20 20 09 2a 73 2b 2b 20 | 3d 20 27 2e 27 3b 0d 09 | .*s++ |= '.';..|
|00004cd0| 20 20 20 20 28 76 6f 69 | 64 29 73 70 72 69 6e 74 | (voi|d)sprint|
|00004ce0| 66 28 73 2c 22 20 49 6e | 70 75 74 20 66 72 6f 6d |f(s," In|put from|
|00004cf0| 20 3c 25 73 3e 2c 20 6c | 69 6e 65 20 25 6c 64 22 | <%s>, l|ine %ld"|
|00004d00| 2c 0d 09 20 20 20 20 20 | 20 6c 61 73 74 5f 69 6e |,.. | last_in|
|00004d10| 5f 73 74 61 62 20 3d 3d | 20 61 72 67 76 73 74 61 |_stab ==| argvsta|
|00004d20| 62 20 3f 20 22 22 20 3a | 20 73 74 61 62 5f 6e 61 |b ? "" :| stab_na|
|00004d30| 6d 65 28 6c 61 73 74 5f | 69 6e 5f 73 74 61 62 29 |me(last_|in_stab)|
|00004d40| 2c 0d 09 20 20 20 20 20 | 20 28 6c 6f 6e 67 29 73 |,.. | (long)s|
|00004d50| 74 61 62 5f 69 6f 28 6c | 61 73 74 5f 69 6e 5f 73 |tab_io(l|ast_in_s|
|00004d60| 74 61 62 29 2d 3e 6c 69 | 6e 65 73 29 3b 0d 09 20 |tab)->li|nes);.. |
|00004d70| 20 20 20 73 20 2b 3d 20 | 73 74 72 6c 65 6e 28 73 | s += |strlen(s|
|00004d80| 29 3b 0d 09 7d 0d 09 69 | 66 20 28 63 75 72 63 6d |);..}..i|f (curcm|
|00004d90| 64 2d 3e 63 5f 6c 69 6e | 65 29 20 7b 0d 09 20 20 |d->c_lin|e) {.. |
|00004da0| 20 20 28 76 6f 69 64 29 | 73 70 72 69 6e 74 66 28 | (void)|sprintf(|
|00004db0| 73 2c 22 5c 6e 46 69 6c | 65 20 5c 22 25 73 5c 22 |s,"\nFil|e \"%s\"|
|00004dc0| 3b 20 4c 69 6e 65 20 25 | 6c 64 22 2c 0d 09 20 20 |; Line %|ld",.. |
|00004dd0| 20 20 20 20 73 74 61 62 | 5f 76 61 6c 28 63 75 72 | stab|_val(cur|
|00004de0| 63 6d 64 2d 3e 63 5f 66 | 69 6c 65 73 74 61 62 29 |cmd->c_f|ilestab)|
|00004df0| 2d 3e 73 74 72 5f 70 74 | 72 2c 20 28 6c 6f 6e 67 |->str_pt|r, (long|
|00004e00| 29 63 75 72 63 6d 64 2d | 3e 63 5f 6c 69 6e 65 29 |)curcmd-|>c_line)|
|00004e10| 3b 0d 09 20 20 20 20 73 | 20 2b 3d 20 73 74 72 6c |;.. s| += strl|
|00004e20| 65 6e 28 73 29 3b 0d 09 | 7d 0d 09 28 76 6f 69 64 |en(s);..|}..(void|
|00004e30| 29 73 74 72 63 70 79 28 | 73 2c 22 5c 6e 22 29 3b |)strcpy(|s,"\n");|
|00004e40| 0d 23 65 6c 73 65 0d 09 | 69 66 20 28 63 75 72 63 |.#else..|if (curc|
|00004e50| 6d 64 2d 3e 63 5f 6c 69 | 6e 65 29 20 7b 0d 09 20 |md->c_li|ne) {.. |
|00004e60| 20 20 20 28 76 6f 69 64 | 29 73 70 72 69 6e 74 66 | (void|)sprintf|
|00004e70| 28 73 2c 22 20 61 74 20 | 25 73 20 6c 69 6e 65 20 |(s," at |%s line |
|00004e80| 25 6c 64 22 2c 0d 09 20 | 20 20 20 20 20 73 74 61 |%ld",.. | sta|
|00004e90| 62 5f 76 61 6c 28 63 75 | 72 63 6d 64 2d 3e 63 5f |b_val(cu|rcmd->c_|
|00004ea0| 66 69 6c 65 73 74 61 62 | 29 2d 3e 73 74 72 5f 70 |filestab|)->str_p|
|00004eb0| 74 72 2c 20 28 6c 6f 6e | 67 29 63 75 72 63 6d 64 |tr, (lon|g)curcmd|
|00004ec0| 2d 3e 63 5f 6c 69 6e 65 | 29 3b 0d 09 20 20 20 20 |->c_line|);.. |
|00004ed0| 73 20 2b 3d 20 73 74 72 | 6c 65 6e 28 73 29 3b 0d |s += str|len(s);.|
|00004ee0| 09 7d 0d 09 69 66 20 28 | 6c 61 73 74 5f 69 6e 5f |.}..if (|last_in_|
|00004ef0| 73 74 61 62 20 26 26 0d | 09 20 20 20 20 73 74 61 |stab &&.|. sta|
|00004f00| 62 5f 69 6f 28 6c 61 73 | 74 5f 69 6e 5f 73 74 61 |b_io(las|t_in_sta|
|00004f10| 62 29 20 26 26 0d 09 20 | 20 20 20 73 74 61 62 5f |b) &&.. | stab_|
|00004f20| 69 6f 28 6c 61 73 74 5f | 69 6e 5f 73 74 61 62 29 |io(last_|in_stab)|
|00004f30| 2d 3e 6c 69 6e 65 73 20 | 29 20 7b 0d 09 20 20 20 |->lines |) {.. |
|00004f40| 20 28 76 6f 69 64 29 73 | 70 72 69 6e 74 66 28 73 | (void)s|printf(s|
|00004f50| 2c 22 2c 20 3c 25 73 3e | 20 6c 69 6e 65 20 25 6c |,", <%s>| line %l|
|00004f60| 64 22 2c 0d 09 20 20 20 | 20 20 20 6c 61 73 74 5f |d",.. | last_|
|00004f70| 69 6e 5f 73 74 61 62 20 | 3d 3d 20 61 72 67 76 73 |in_stab |== argvs|
|00004f80| 74 61 62 20 3f 20 22 22 | 20 3a 20 73 74 61 62 5f |tab ? ""| : stab_|
|00004f90| 65 6e 61 6d 65 28 6c 61 | 73 74 5f 69 6e 5f 73 74 |ename(la|st_in_st|
|00004fa0| 61 62 29 2c 0d 09 20 20 | 20 20 20 20 28 6c 6f 6e |ab),.. | (lon|
|00004fb0| 67 29 73 74 61 62 5f 69 | 6f 28 6c 61 73 74 5f 69 |g)stab_i|o(last_i|
|00004fc0| 6e 5f 73 74 61 62 29 2d | 3e 6c 69 6e 65 73 29 3b |n_stab)-|>lines);|
|00004fd0| 0d 09 20 20 20 20 73 20 | 2b 3d 20 73 74 72 6c 65 |.. s |+= strle|
|00004fe0| 6e 28 73 29 3b 0d 09 7d | 0d 09 28 76 6f 69 64 29 |n(s);..}|..(void)|
|00004ff0| 73 74 72 63 70 79 28 73 | 2c 22 2e 5c 6e 22 29 3b |strcpy(s|,".\n");|
|00005000| 0d 23 65 6e 64 69 66 0d | 09 69 66 20 28 75 73 65 |.#endif.|.if (use|
|00005010| 72 6d 65 73 73 29 0d 09 | 20 20 20 20 73 74 72 5f |rmess)..| str_|
|00005020| 63 61 74 28 74 6d 70 73 | 74 72 2c 62 75 66 2b 31 |cat(tmps|tr,buf+1|
|00005030| 29 3b 0d 20 20 20 20 7d | 0d 20 20 20 20 69 66 20 |);. }|. if |
|00005040| 28 75 73 65 72 6d 65 73 | 73 29 0d 09 72 65 74 75 |(usermes|s)..retu|
|00005050| 72 6e 20 74 6d 70 73 74 | 72 2d 3e 73 74 72 5f 70 |rn tmpst|r->str_p|
|00005060| 74 72 3b 0d 20 20 20 20 | 65 6c 73 65 0d 09 72 65 |tr;. |else..re|
|00005070| 74 75 72 6e 20 62 75 66 | 3b 0d 7d 0d 0d 2f 2a 56 |turn buf|;.}../*V|
|00005080| 41 52 41 52 47 53 31 2a | 2f 0d 76 6f 69 64 20 66 |ARARGS1*|/.void f|
|00005090| 61 74 61 6c 28 70 61 74 | 2c 61 31 2c 61 32 2c 61 |atal(pat|,a1,a2,a|
|000050a0| 33 2c 61 34 29 0d 63 68 | 61 72 20 2a 70 61 74 3b |3,a4).ch|ar *pat;|
|000050b0| 0d 6c 6f 6e 67 20 61 31 | 2c 20 61 32 2c 20 61 33 |.long a1|, a2, a3|
|000050c0| 2c 20 61 34 3b 0d 7b 0d | 20 20 20 20 65 78 74 65 |, a4;.{.| exte|
|000050d0| 72 6e 20 46 49 4c 45 20 | 2a 65 5f 66 70 3b 0d 20 |rn FILE |*e_fp;. |
|000050e0| 20 20 20 65 78 74 65 72 | 6e 20 63 68 61 72 20 2a | exter|n char *|
|000050f0| 65 5f 74 6d 70 6e 61 6d | 65 3b 0d 20 20 20 20 63 |e_tmpnam|e;. c|
|00005100| 68 61 72 20 2a 74 6d 70 | 73 3b 0d 20 20 20 20 63 |har *tmp|s;. c|
|00005110| 68 61 72 20 2a 6d 65 73 | 73 61 67 65 3b 0d 0d 20 |har *mes|sage;.. |
|00005120| 20 20 20 6d 65 73 73 61 | 67 65 20 3d 20 6d 65 73 | messa|ge = mes|
|00005130| 73 28 70 61 74 2c 61 31 | 2c 61 32 2c 61 33 2c 61 |s(pat,a1|,a2,a3,a|
|00005140| 34 29 3b 0d 20 20 20 20 | 69 66 20 28 69 6e 5f 65 |4);. |if (in_e|
|00005150| 76 61 6c 29 20 7b 0d 09 | 73 74 72 5f 73 65 74 28 |val) {..|str_set(|
|00005160| 73 74 61 62 5f 76 61 6c | 28 73 74 61 62 65 6e 74 |stab_val|(stabent|
|00005170| 28 22 40 22 2c 54 52 55 | 45 29 29 2c 6d 65 73 73 |("@",TRU|E)),mess|
|00005180| 61 67 65 29 3b 0d 09 74 | 6d 70 73 20 3d 20 22 5f |age);..t|mps = "_|
|00005190| 45 56 41 4c 5f 22 3b 0d | 09 77 68 69 6c 65 20 28 |EVAL_";.|.while (|
|000051a0| 6c 6f 6f 70 5f 70 74 72 | 20 3e 3d 20 30 20 26 26 |loop_ptr| >= 0 &&|
|000051b0| 20 28 21 6c 6f 6f 70 5f | 73 74 61 63 6b 5b 6c 6f | (!loop_|stack[lo|
|000051c0| 6f 70 5f 70 74 72 5d 2e | 6c 6f 6f 70 5f 6c 61 62 |op_ptr].|loop_lab|
|000051d0| 65 6c 20 7c 7c 0d 09 20 | 20 73 74 72 4e 45 28 74 |el ||.. | strNE(t|
|000051e0| 6d 70 73 2c 6c 6f 6f 70 | 5f 73 74 61 63 6b 5b 6c |mps,loop|_stack[l|
|000051f0| 6f 6f 70 5f 70 74 72 5d | 2e 6c 6f 6f 70 5f 6c 61 |oop_ptr]|.loop_la|
|00005200| 62 65 6c 29 20 29 29 20 | 7b 0d 23 69 66 64 65 66 |bel) )) |{.#ifdef|
|00005210| 20 44 45 42 55 47 47 49 | 4e 47 0d 09 20 20 20 20 | DEBUGGI|NG.. |
|00005220| 69 66 20 28 64 65 62 75 | 67 20 26 20 34 29 20 7b |if (debu|g & 4) {|
|00005230| 0d 09 09 64 65 62 28 22 | 28 53 6b 69 70 70 69 6e |...deb("|(Skippin|
|00005240| 67 20 6c 61 62 65 6c 20 | 23 25 64 20 25 73 29 5c |g label |#%d %s)\|
|00005250| 6e 22 2c 6c 6f 6f 70 5f | 70 74 72 2c 0d 09 09 20 |n",loop_|ptr,... |
|00005260| 20 20 20 6c 6f 6f 70 5f | 73 74 61 63 6b 5b 6c 6f | loop_|stack[lo|
|00005270| 6f 70 5f 70 74 72 5d 2e | 6c 6f 6f 70 5f 6c 61 62 |op_ptr].|loop_lab|
|00005280| 65 6c 29 3b 0d 09 20 20 | 20 20 7d 0d 23 65 6e 64 |el);.. | }.#end|
|00005290| 69 66 0d 09 20 20 20 20 | 6c 6f 6f 70 5f 70 74 72 |if.. |loop_ptr|
|000052a0| 2d 2d 3b 0d 09 7d 0d 23 | 69 66 64 65 66 20 44 45 |--;..}.#|ifdef DE|
|000052b0| 42 55 47 47 49 4e 47 0d | 09 69 66 20 28 64 65 62 |BUGGING.|.if (deb|
|000052c0| 75 67 20 26 20 34 29 20 | 7b 0d 09 20 20 20 20 64 |ug & 4) |{.. d|
|000052d0| 65 62 28 22 28 46 6f 75 | 6e 64 20 6c 61 62 65 6c |eb("(Fou|nd label|
|000052e0| 20 23 25 64 20 25 73 29 | 5c 6e 22 2c 6c 6f 6f 70 | #%d %s)|\n",loop|
|000052f0| 5f 70 74 72 2c 0d 09 09 | 6c 6f 6f 70 5f 73 74 61 |_ptr,...|loop_sta|
|00005300| 63 6b 5b 6c 6f 6f 70 5f | 70 74 72 5d 2e 6c 6f 6f |ck[loop_|ptr].loo|
|00005310| 70 5f 6c 61 62 65 6c 29 | 3b 0d 09 7d 0d 23 65 6e |p_label)|;..}.#en|
|00005320| 64 69 66 0d 09 69 66 20 | 28 6c 6f 6f 70 5f 70 74 |dif..if |(loop_pt|
|00005330| 72 20 3c 20 30 29 20 7b | 0d 09 20 20 20 20 69 6e |r < 0) {|.. in|
|00005340| 5f 65 76 61 6c 20 3d 20 | 30 3b 0d 09 20 20 20 20 |_eval = |0;.. |
|00005350| 66 61 74 61 6c 28 22 42 | 61 64 20 6c 61 62 65 6c |fatal("B|ad label|
|00005360| 3a 20 25 73 22 2c 20 74 | 6d 70 73 29 3b 0d 09 7d |: %s", t|mps);..}|
|00005370| 0d 09 6c 6f 6e 67 6a 6d | 70 28 6c 6f 6f 70 5f 73 |..longjm|p(loop_s|
|00005380| 74 61 63 6b 5b 6c 6f 6f | 70 5f 70 74 72 5d 2e 6c |tack[loo|p_ptr].l|
|00005390| 6f 6f 70 5f 65 6e 76 2c | 20 31 29 3b 0d 20 20 20 |oop_env,| 1);. |
|000053a0| 20 7d 0d 20 20 20 20 66 | 70 75 74 73 28 6d 65 73 | }. f|puts(mes|
|000053b0| 73 61 67 65 2c 73 74 64 | 65 72 72 29 3b 0d 20 20 |sage,std|err);. |
|000053c0| 20 20 28 76 6f 69 64 29 | 66 66 6c 75 73 68 28 73 | (void)|fflush(s|
|000053d0| 74 64 65 72 72 29 3b 0d | 20 20 20 20 69 66 20 28 |tderr);.| if (|
|000053e0| 65 5f 66 70 29 0d 09 28 | 76 6f 69 64 29 55 4e 4c |e_fp)..(|void)UNL|
|000053f0| 49 4e 4b 28 65 5f 74 6d | 70 6e 61 6d 65 29 3b 0d |INK(e_tm|pname);.|
|00005400| 20 20 20 20 73 74 61 74 | 75 73 76 61 6c 75 65 20 | stat|usvalue |
|00005410| 3e 3e 3d 20 38 3b 0d 20 | 20 20 20 65 78 69 74 28 |>>= 8;. | exit(|
|00005420| 28 69 6e 74 29 28 28 65 | 72 72 6e 6f 26 32 35 35 |(int)((e|rrno&255|
|00005430| 29 3f 65 72 72 6e 6f 3a | 28 28 73 74 61 74 75 73 |)?errno:|((status|
|00005440| 76 61 6c 75 65 26 32 35 | 35 29 3f 73 74 61 74 75 |value&25|5)?statu|
|00005450| 73 76 61 6c 75 65 3a 32 | 35 35 29 29 29 3b 0d 7d |svalue:2|55)));.}|
|00005460| 0d 0d 2f 2a 56 41 52 41 | 52 47 53 31 2a 2f 0d 76 |../*VARA|RGS1*/.v|
|00005470| 6f 69 64 20 77 61 72 6e | 28 70 61 74 2c 61 31 2c |oid warn|(pat,a1,|
|00005480| 61 32 2c 61 33 2c 61 34 | 29 0d 63 68 61 72 20 2a |a2,a3,a4|).char *|
|00005490| 70 61 74 3b 0d 6c 6f 6e | 67 20 61 31 2c 20 61 32 |pat;.lon|g a1, a2|
|000054a0| 2c 20 61 33 2c 20 61 34 | 3b 0d 7b 0d 20 20 20 20 |, a3, a4|;.{. |
|000054b0| 63 68 61 72 20 2a 6d 65 | 73 73 61 67 65 3b 0d 0d |char *me|ssage;..|
|000054c0| 20 20 20 20 6d 65 73 73 | 61 67 65 20 3d 20 6d 65 | mess|age = me|
|000054d0| 73 73 28 70 61 74 2c 61 | 31 2c 61 32 2c 61 33 2c |ss(pat,a|1,a2,a3,|
|000054e0| 61 34 29 3b 0d 20 20 20 | 20 66 70 75 74 73 28 6d |a4);. | fputs(m|
|000054f0| 65 73 73 61 67 65 2c 73 | 74 64 65 72 72 29 3b 0d |essage,s|tderr);.|
|00005500| 23 69 66 64 65 66 20 4c | 45 41 4b 54 45 53 54 0d |#ifdef L|EAKTEST.|
|00005510| 23 69 66 64 65 66 20 44 | 45 42 55 47 47 49 4e 47 |#ifdef D|EBUGGING|
|00005520| 0d 20 20 20 20 69 66 20 | 28 64 65 62 75 67 20 26 |. if |(debug &|
|00005530| 20 34 30 39 36 29 0d 09 | 78 73 74 61 74 28 29 3b | 4096)..|xstat();|
|00005540| 0d 23 65 6e 64 69 66 0d | 23 65 6e 64 69 66 0d 20 |.#endif.|#endif. |
|00005550| 20 20 20 28 76 6f 69 64 | 29 66 66 6c 75 73 68 28 | (void|)fflush(|
|00005560| 73 74 64 65 72 72 29 3b | 0d 7d 0d 23 65 6c 73 65 |stderr);|.}.#else|
|00005570| 0d 2f 2a 56 41 52 41 52 | 47 53 30 2a 2f 0d 63 68 |./*VARAR|GS0*/.ch|
|00005580| 61 72 20 2a 0d 6d 65 73 | 73 28 61 72 67 73 29 0d |ar *.mes|s(args).|
|00005590| 76 61 5f 6c 69 73 74 20 | 61 72 67 73 3b 0d 7b 0d |va_list |args;.{.|
|000055a0| 20 20 20 20 63 68 61 72 | 20 2a 70 61 74 3b 0d 20 | char| *pat;. |
|000055b0| 20 20 20 63 68 61 72 20 | 2a 73 3b 0d 20 20 20 20 | char |*s;. |
|000055c0| 53 54 52 20 2a 74 6d 70 | 73 74 72 3b 0d 20 20 20 |STR *tmp|str;. |
|000055d0| 20 69 6e 74 20 75 73 65 | 72 6d 65 73 73 3b 0d 23 | int use|rmess;.#|
|000055e0| 69 66 6e 64 65 66 20 48 | 41 53 5f 56 50 52 49 4e |ifndef H|AS_VPRIN|
|000055f0| 54 46 0d 23 69 66 64 65 | 66 20 43 48 41 52 56 53 |TF.#ifde|f CHARVS|
|00005600| 50 52 49 4e 54 46 0d 20 | 20 20 20 63 68 61 72 20 |PRINTF. | char |
|00005610| 2a 76 73 70 72 69 6e 74 | 66 28 29 3b 0d 23 65 6c |*vsprint|f();.#el|
|00005620| 73 65 0d 20 20 20 20 69 | 6e 74 20 76 73 70 72 69 |se. i|nt vspri|
|00005630| 6e 74 66 28 29 3b 0d 23 | 65 6e 64 69 66 0d 23 65 |ntf();.#|endif.#e|
|00005640| 6e 64 69 66 0d 0d 23 69 | 66 64 65 66 20 6c 69 6e |ndif..#i|fdef lin|
|00005650| 74 0d 20 20 20 20 70 61 | 74 20 3d 20 4e 75 6c 6c |t. pa|t = Null|
|00005660| 63 68 3b 0d 23 65 6c 73 | 65 0d 20 20 20 20 70 61 |ch;.#els|e. pa|
|00005670| 74 20 3d 20 76 61 5f 61 | 72 67 28 61 72 67 73 2c |t = va_a|rg(args,|
|00005680| 20 63 68 61 72 20 2a 29 | 3b 0d 23 65 6e 64 69 66 | char *)|;.#endif|
|00005690| 0d 20 20 20 20 73 20 3d | 20 62 75 66 3b 0d 20 20 |. s =| buf;. |
|000056a0| 20 20 75 73 65 72 6d 65 | 73 73 20 3d 20 73 74 72 | userme|ss = str|
|000056b0| 45 51 28 70 61 74 2c 20 | 22 25 73 22 29 3b 0d 20 |EQ(pat, |"%s");. |
|000056c0| 20 20 20 69 66 20 28 75 | 73 65 72 6d 65 73 73 29 | if (u|sermess)|
|000056d0| 20 7b 0d 09 74 6d 70 73 | 74 72 20 3d 20 73 74 72 | {..tmps|tr = str|
|000056e0| 5f 6d 6f 72 74 61 6c 28 | 26 73 74 72 5f 75 6e 64 |_mortal(|&str_und|
|000056f0| 65 66 29 3b 0d 09 73 74 | 72 5f 73 65 74 28 74 6d |ef);..st|r_set(tm|
|00005700| 70 73 74 72 2c 20 76 61 | 5f 61 72 67 28 61 72 67 |pstr, va|_arg(arg|
|00005710| 73 2c 20 63 68 61 72 20 | 2a 29 29 3b 0d 09 2a 73 |s, char |*));..*s|
|00005720| 2b 2b 20 3d 20 74 6d 70 | 73 74 72 2d 3e 73 74 72 |++ = tmp|str->str|
|00005730| 5f 70 74 72 5b 74 6d 70 | 73 74 72 2d 3e 73 74 72 |_ptr[tmp|str->str|
|00005740| 5f 63 75 72 2d 31 5d 3b | 0d 20 20 20 20 7d 0d 20 |_cur-1];|. }. |
|00005750| 20 20 20 65 6c 73 65 20 | 7b 0d 09 28 76 6f 69 64 | else |{..(void|
|00005760| 29 20 76 73 70 72 69 6e | 74 66 28 73 2c 70 61 74 |) vsprin|tf(s,pat|
|00005770| 2c 61 72 67 73 29 3b 0d | 09 73 20 2b 3d 20 73 74 |,args);.|.s += st|
|00005780| 72 6c 65 6e 28 73 29 3b | 0d 20 20 20 20 7d 0d 0d |rlen(s);|. }..|
|00005790| 20 20 20 20 69 66 20 28 | 73 5b 2d 31 5d 20 21 3d | if (|s[-1] !=|
|000057a0| 20 27 5c 6e 27 29 20 7b | 0d 09 69 66 20 28 63 75 | '\n') {|..if (cu|
|000057b0| 72 63 6d 64 2d 3e 63 5f | 6c 69 6e 65 29 20 7b 0d |rcmd->c_|line) {.|
|000057c0| 09 20 20 20 20 28 76 6f | 69 64 29 73 70 72 69 6e |. (vo|id)sprin|
|000057d0| 74 66 28 73 2c 22 20 61 | 74 20 25 73 20 6c 69 6e |tf(s," a|t %s lin|
|000057e0| 65 20 25 6c 64 22 2c 0d | 09 20 20 20 20 20 20 73 |e %ld",.|. s|
|000057f0| 74 61 62 5f 76 61 6c 28 | 63 75 72 63 6d 64 2d 3e |tab_val(|curcmd->|
|00005800| 63 5f 66 69 6c 65 73 74 | 61 62 29 2d 3e 73 74 72 |c_filest|ab)->str|
|00005810| 5f 70 74 72 2c 20 28 6c | 6f 6e 67 29 63 75 72 63 |_ptr, (l|ong)curc|
|00005820| 6d 64 2d 3e 63 5f 6c 69 | 6e 65 29 3b 0d 09 20 20 |md->c_li|ne);.. |
|00005830| 20 20 73 20 2b 3d 20 73 | 74 72 6c 65 6e 28 73 29 | s += s|trlen(s)|
|00005840| 3b 0d 09 7d 0d 09 69 66 | 20 28 6c 61 73 74 5f 69 |;..}..if| (last_i|
|00005850| 6e 5f 73 74 61 62 20 26 | 26 0d 09 20 20 20 20 73 |n_stab &|&.. s|
|00005860| 74 61 62 5f 69 6f 28 6c | 61 73 74 5f 69 6e 5f 73 |tab_io(l|ast_in_s|
|00005870| 74 61 62 29 20 26 26 0d | 09 20 20 20 20 73 74 61 |tab) &&.|. sta|
|00005880| 62 5f 69 6f 28 6c 61 73 | 74 5f 69 6e 5f 73 74 61 |b_io(las|t_in_sta|
|00005890| 62 29 2d 3e 6c 69 6e 65 | 73 20 29 20 7b 0d 09 20 |b)->line|s ) {.. |
|000058a0| 20 20 20 28 76 6f 69 64 | 29 73 70 72 69 6e 74 66 | (void|)sprintf|
|000058b0| 28 73 2c 22 2c 20 3c 25 | 73 3e 20 6c 69 6e 65 20 |(s,", <%|s> line |
|000058c0| 25 6c 64 22 2c 0d 09 20 | 20 20 20 20 20 6c 61 73 |%ld",.. | las|
|000058d0| 74 5f 69 6e 5f 73 74 61 | 62 20 3d 3d 20 61 72 67 |t_in_sta|b == arg|
|000058e0| 76 73 74 61 62 20 3f 20 | 22 22 20 3a 20 6c 61 73 |vstab ? |"" : las|
|000058f0| 74 5f 69 6e 5f 73 74 61 | 62 2d 3e 73 74 72 5f 6d |t_in_sta|b->str_m|
|00005900| 61 67 69 63 2d 3e 73 74 | 72 5f 70 74 72 2c 0d 09 |agic->st|r_ptr,..|
|00005910| 20 20 20 20 20 20 28 6c | 6f 6e 67 29 73 74 61 62 | (l|ong)stab|
|00005920| 5f 69 6f 28 6c 61 73 74 | 5f 69 6e 5f 73 74 61 62 |_io(last|_in_stab|
|00005930| 29 2d 3e 6c 69 6e 65 73 | 29 3b 0d 09 20 20 20 20 |)->lines|);.. |
|00005940| 73 20 2b 3d 20 73 74 72 | 6c 65 6e 28 73 29 3b 0d |s += str|len(s);.|
|00005950| 09 7d 0d 09 28 76 6f 69 | 64 29 73 74 72 63 70 79 |.}..(voi|d)strcpy|
|00005960| 28 73 2c 22 2e 5c 6e 22 | 29 3b 0d 09 69 66 20 28 |(s,".\n"|);..if (|
|00005970| 75 73 65 72 6d 65 73 73 | 29 0d 09 20 20 20 20 73 |usermess|).. s|
|00005980| 74 72 5f 63 61 74 28 74 | 6d 70 73 74 72 2c 62 75 |tr_cat(t|mpstr,bu|
|00005990| 66 2b 31 29 3b 0d 20 20 | 20 20 7d 0d 0d 20 20 20 |f+1);. | }.. |
|000059a0| 20 69 66 20 28 75 73 65 | 72 6d 65 73 73 29 0d 09 | if (use|rmess)..|
|000059b0| 72 65 74 75 72 6e 20 74 | 6d 70 73 74 72 2d 3e 73 |return t|mpstr->s|
|000059c0| 74 72 5f 70 74 72 3b 0d | 20 20 20 20 65 6c 73 65 |tr_ptr;.| else|
|000059d0| 0d 09 72 65 74 75 72 6e | 20 62 75 66 3b 0d 7d 0d |..return| buf;.}.|
|000059e0| 0d 2f 2a 56 41 52 41 52 | 47 53 30 2a 2f 0d 76 6f |./*VARAR|GS0*/.vo|
|000059f0| 69 64 20 66 61 74 61 6c | 28 76 61 5f 61 6c 69 73 |id fatal|(va_alis|
|00005a00| 74 29 0d 76 61 5f 64 63 | 6c 0d 7b 0d 20 20 20 20 |t).va_dc|l.{. |
|00005a10| 76 61 5f 6c 69 73 74 20 | 61 72 67 73 3b 0d 20 20 |va_list |args;. |
|00005a20| 20 20 65 78 74 65 72 6e | 20 46 49 4c 45 20 2a 65 | extern| FILE *e|
|00005a30| 5f 66 70 3b 0d 20 20 20 | 20 65 78 74 65 72 6e 20 |_fp;. | extern |
|00005a40| 63 68 61 72 20 2a 65 5f | 74 6d 70 6e 61 6d 65 3b |char *e_|tmpname;|
|00005a50| 0d 20 20 20 20 63 68 61 | 72 20 2a 74 6d 70 73 3b |. cha|r *tmps;|
|00005a60| 0d 20 20 20 20 63 68 61 | 72 20 2a 6d 65 73 73 61 |. cha|r *messa|
|00005a70| 67 65 3b 0d 0d 23 69 66 | 6e 64 65 66 20 6c 69 6e |ge;..#if|ndef lin|
|00005a80| 74 0d 20 20 20 20 76 61 | 5f 73 74 61 72 74 28 61 |t. va|_start(a|
|00005a90| 72 67 73 29 3b 0d 23 65 | 6c 73 65 0d 20 20 20 20 |rgs);.#e|lse. |
|00005aa0| 61 72 67 73 20 3d 20 30 | 3b 0d 23 65 6e 64 69 66 |args = 0|;.#endif|
|00005ab0| 0d 20 20 20 20 6d 65 73 | 73 61 67 65 20 3d 20 6d |. mes|sage = m|
|00005ac0| 65 73 73 28 61 72 67 73 | 29 3b 0d 20 20 20 20 76 |ess(args|);. v|
|00005ad0| 61 5f 65 6e 64 28 61 72 | 67 73 29 3b 0d 20 20 20 |a_end(ar|gs);. |
|00005ae0| 20 69 66 20 28 69 6e 5f | 65 76 61 6c 29 20 7b 0d | if (in_|eval) {.|
|00005af0| 09 73 74 72 5f 73 65 74 | 28 73 74 61 62 5f 76 61 |.str_set|(stab_va|
|00005b00| 6c 28 73 74 61 62 65 6e | 74 28 22 40 22 2c 54 52 |l(staben|t("@",TR|
|00005b10| 55 45 29 29 2c 6d 65 73 | 73 61 67 65 29 3b 0d 09 |UE)),mes|sage);..|
|00005b20| 74 6d 70 73 20 3d 20 22 | 5f 45 56 41 4c 5f 22 3b |tmps = "|_EVAL_";|
|00005b30| 0d 09 77 68 69 6c 65 20 | 28 6c 6f 6f 70 5f 70 74 |..while |(loop_pt|
|00005b40| 72 20 3e 3d 20 30 20 26 | 26 20 28 21 6c 6f 6f 70 |r >= 0 &|& (!loop|
|00005b50| 5f 73 74 61 63 6b 5b 6c | 6f 6f 70 5f 70 74 72 5d |_stack[l|oop_ptr]|
|00005b60| 2e 6c 6f 6f 70 5f 6c 61 | 62 65 6c 20 7c 7c 0d 09 |.loop_la|bel ||..|
|00005b70| 20 20 73 74 72 4e 45 28 | 74 6d 70 73 2c 6c 6f 6f | strNE(|tmps,loo|
|00005b80| 70 5f 73 74 61 63 6b 5b | 6c 6f 6f 70 5f 70 74 72 |p_stack[|loop_ptr|
|00005b90| 5d 2e 6c 6f 6f 70 5f 6c | 61 62 65 6c 29 20 29 29 |].loop_l|abel) ))|
|00005ba0| 20 7b 0d 23 69 66 64 65 | 66 20 44 45 42 55 47 47 | {.#ifde|f DEBUGG|
|00005bb0| 49 4e 47 0d 09 20 20 20 | 20 69 66 20 28 64 65 62 |ING.. | if (deb|
|00005bc0| 75 67 20 26 20 34 29 20 | 7b 0d 09 09 64 65 62 28 |ug & 4) |{...deb(|
|00005bd0| 22 28 53 6b 69 70 70 69 | 6e 67 20 6c 61 62 65 6c |"(Skippi|ng label|
|00005be0| 20 23 25 64 20 25 73 29 | 5c 6e 22 2c 6c 6f 6f 70 | #%d %s)|\n",loop|
|00005bf0| 5f 70 74 72 2c 0d 09 09 | 20 20 20 20 6c 6f 6f 70 |_ptr,...| loop|
|00005c00| 5f 73 74 61 63 6b 5b 6c | 6f 6f 70 5f 70 74 72 5d |_stack[l|oop_ptr]|
|00005c10| 2e 6c 6f 6f 70 5f 6c 61 | 62 65 6c 29 3b 0d 09 20 |.loop_la|bel);.. |
|00005c20| 20 20 20 7d 0d 23 65 6e | 64 69 66 0d 09 20 20 20 | }.#en|dif.. |
|00005c30| 20 6c 6f 6f 70 5f 70 74 | 72 2d 2d 3b 0d 09 7d 0d | loop_pt|r--;..}.|
|00005c40| 23 69 66 64 65 66 20 44 | 45 42 55 47 47 49 4e 47 |#ifdef D|EBUGGING|
|00005c50| 0d 09 69 66 20 28 64 65 | 62 75 67 20 26 20 34 29 |..if (de|bug & 4)|
|00005c60| 20 7b 0d 09 20 20 20 20 | 64 65 62 28 22 28 46 6f | {.. |deb("(Fo|
|00005c70| 75 6e 64 20 6c 61 62 65 | 6c 20 23 25 64 20 25 73 |und labe|l #%d %s|
|00005c80| 29 5c 6e 22 2c 6c 6f 6f | 70 5f 70 74 72 2c 0d 09 |)\n",loo|p_ptr,..|
|00005c90| 09 6c 6f 6f 70 5f 73 74 | 61 63 6b 5b 6c 6f 6f 70 |.loop_st|ack[loop|
|00005ca0| 5f 70 74 72 5d 2e 6c 6f | 6f 70 5f 6c 61 62 65 6c |_ptr].lo|op_label|
|00005cb0| 29 3b 0d 09 7d 0d 23 65 | 6e 64 69 66 0d 09 69 66 |);..}.#e|ndif..if|
|00005cc0| 20 28 6c 6f 6f 70 5f 70 | 74 72 20 3c 20 30 29 20 | (loop_p|tr < 0) |
|00005cd0| 7b 0d 09 20 20 20 20 69 | 6e 5f 65 76 61 6c 20 3d |{.. i|n_eval =|
|00005ce0| 20 30 3b 0d 09 20 20 20 | 20 66 61 74 61 6c 28 22 | 0;.. | fatal("|
|00005cf0| 42 61 64 20 6c 61 62 65 | 6c 3a 20 25 73 22 2c 20 |Bad labe|l: %s", |
|00005d00| 74 6d 70 73 29 3b 0d 09 | 7d 0d 09 6c 6f 6e 67 6a |tmps);..|}..longj|
|00005d10| 6d 70 28 6c 6f 6f 70 5f | 73 74 61 63 6b 5b 6c 6f |mp(loop_|stack[lo|
|00005d20| 6f 70 5f 70 74 72 5d 2e | 6c 6f 6f 70 5f 65 6e 76 |op_ptr].|loop_env|
|00005d30| 2c 20 31 29 3b 0d 20 20 | 20 20 7d 0d 20 20 20 20 |, 1);. | }. |
|00005d40| 66 70 75 74 73 28 6d 65 | 73 73 61 67 65 2c 73 74 |fputs(me|ssage,st|
|00005d50| 64 65 72 72 29 3b 0d 20 | 20 20 20 28 76 6f 69 64 |derr);. | (void|
|00005d60| 29 66 66 6c 75 73 68 28 | 73 74 64 65 72 72 29 3b |)fflush(|stderr);|
|00005d70| 0d 20 20 20 20 69 66 20 | 28 65 5f 66 70 29 0d 09 |. if |(e_fp)..|
|00005d80| 28 76 6f 69 64 29 55 4e | 4c 49 4e 4b 28 65 5f 74 |(void)UN|LINK(e_t|
|00005d90| 6d 70 6e 61 6d 65 29 3b | 0d 20 20 20 20 73 74 61 |mpname);|. sta|
|00005da0| 74 75 73 76 61 6c 75 65 | 20 3e 3e 3d 20 38 3b 0d |tusvalue| >>= 8;.|
|00005db0| 20 20 20 20 65 78 69 74 | 28 28 69 6e 74 29 28 28 | exit|((int)((|
|00005dc0| 65 72 72 6e 6f 26 32 35 | 35 29 3f 65 72 72 6e 6f |errno&25|5)?errno|
|00005dd0| 3a 28 28 73 74 61 74 75 | 73 76 61 6c 75 65 26 32 |:((statu|svalue&2|
|00005de0| 35 35 29 3f 73 74 61 74 | 75 73 76 61 6c 75 65 3a |55)?stat|usvalue:|
|00005df0| 32 35 35 29 29 29 3b 0d | 7d 0d 0d 2f 2a 56 41 52 |255)));.|}../*VAR|
|00005e00| 41 52 47 53 30 2a 2f 0d | 76 6f 69 64 20 77 61 72 |ARGS0*/.|void war|
|00005e10| 6e 28 76 61 5f 61 6c 69 | 73 74 29 0d 76 61 5f 64 |n(va_ali|st).va_d|
|00005e20| 63 6c 0d 7b 0d 20 20 20 | 20 76 61 5f 6c 69 73 74 |cl.{. | va_list|
|00005e30| 20 61 72 67 73 3b 0d 20 | 20 20 20 63 68 61 72 20 | args;. | char |
|00005e40| 2a 6d 65 73 73 61 67 65 | 3b 0d 0d 23 69 66 6e 64 |*message|;..#ifnd|
|00005e50| 65 66 20 6c 69 6e 74 0d | 20 20 20 20 76 61 5f 73 |ef lint.| va_s|
|00005e60| 74 61 72 74 28 61 72 67 | 73 29 3b 0d 23 65 6c 73 |tart(arg|s);.#els|
|00005e70| 65 0d 20 20 20 20 61 72 | 67 73 20 3d 20 30 3b 0d |e. ar|gs = 0;.|
|00005e80| 23 65 6e 64 69 66 0d 20 | 20 20 20 6d 65 73 73 61 |#endif. | messa|
|00005e90| 67 65 20 3d 20 6d 65 73 | 73 28 61 72 67 73 29 3b |ge = mes|s(args);|
|00005ea0| 0d 20 20 20 20 76 61 5f | 65 6e 64 28 61 72 67 73 |. va_|end(args|
|00005eb0| 29 3b 0d 0d 20 20 20 20 | 66 70 75 74 73 28 6d 65 |);.. |fputs(me|
|00005ec0| 73 73 61 67 65 2c 73 74 | 64 65 72 72 29 3b 0d 23 |ssage,st|derr);.#|
|00005ed0| 69 66 64 65 66 20 4c 45 | 41 4b 54 45 53 54 0d 23 |ifdef LE|AKTEST.#|
|00005ee0| 69 66 64 65 66 20 44 45 | 42 55 47 47 49 4e 47 0d |ifdef DE|BUGGING.|
|00005ef0| 20 20 20 20 69 66 20 28 | 64 65 62 75 67 20 26 20 | if (|debug & |
|00005f00| 34 30 39 36 29 0d 09 78 | 73 74 61 74 28 29 3b 0d |4096)..x|stat();.|
|00005f10| 23 65 6e 64 69 66 0d 23 | 65 6e 64 69 66 0d 20 20 |#endif.#|endif. |
|00005f20| 20 20 28 76 6f 69 64 29 | 66 66 6c 75 73 68 28 73 | (void)|fflush(s|
|00005f30| 74 64 65 72 72 29 3b 0d | 7d 0d 23 65 6e 64 69 66 |tderr);.|}.#endif|
|00005f40| 0d 0d 76 6f 69 64 0d 6d | 79 5f 73 65 74 65 6e 76 |..void.m|y_setenv|
|00005f50| 28 6e 61 6d 2c 76 61 6c | 29 0d 63 68 61 72 20 2a |(nam,val|).char *|
|00005f60| 6e 61 6d 2c 20 2a 76 61 | 6c 3b 0d 7b 0d 20 20 20 |nam, *va|l;.{. |
|00005f70| 20 72 65 67 69 73 74 65 | 72 20 69 6e 74 20 69 3d | registe|r int i=|
|00005f80| 65 6e 76 69 78 28 6e 61 | 6d 29 3b 09 09 2f 2a 20 |envix(na|m);../* |
|00005f90| 77 68 65 72 65 20 64 6f | 65 73 20 69 74 20 67 6f |where do|es it go|
|00005fa0| 3f 20 2a 2f 0d 0d 20 20 | 20 20 69 66 20 28 65 6e |? */.. | if (en|
|00005fb0| 76 69 72 6f 6e 20 3d 3d | 20 6f 72 69 67 65 6e 76 |viron ==| origenv|
|00005fc0| 69 72 6f 6e 29 20 7b 09 | 2f 2a 20 6e 65 65 64 20 |iron) {.|/* need |
|00005fd0| 77 65 20 63 6f 70 79 20 | 65 6e 76 69 72 6f 6e 6d |we copy |environm|
|00005fe0| 65 6e 74 3f 20 2a 2f 0d | 09 69 6e 74 20 6a 3b 0d |ent? */.|.int j;.|
|00005ff0| 09 69 6e 74 20 6d 61 78 | 3b 0d 09 63 68 61 72 20 |.int max|;..char |
|00006000| 2a 2a 74 6d 70 65 6e 76 | 3b 0d 0d 09 2f 2a 53 55 |**tmpenv|;.../*SU|
|00006010| 50 50 52 45 53 53 20 35 | 33 30 2a 2f 0d 09 66 6f |PPRESS 5|30*/..fo|
|00006020| 72 20 28 6d 61 78 20 3d | 20 69 3b 20 65 6e 76 69 |r (max =| i; envi|
|00006030| 72 6f 6e 5b 6d 61 78 5d | 3b 20 6d 61 78 2b 2b 29 |ron[max]|; max++)|
|00006040| 20 3b 0d 09 4e 65 77 28 | 39 30 31 2c 74 6d 70 65 | ;..New(|901,tmpe|
|00006050| 6e 76 2c 20 6d 61 78 2b | 32 2c 20 63 68 61 72 2a |nv, max+|2, char*|
|00006060| 29 3b 0d 09 66 6f 72 20 | 28 6a 3d 30 3b 20 6a 3c |);..for |(j=0; j<|
|00006070| 6d 61 78 3b 20 6a 2b 2b | 29 09 09 2f 2a 20 63 6f |max; j++|)../* co|
|00006080| 70 79 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 2a |py envir|onment *|
|00006090| 2f 0d 09 20 20 20 20 74 | 6d 70 65 6e 76 5b 6a 5d |/.. t|mpenv[j]|
|000060a0| 20 3d 20 73 61 76 65 73 | 74 72 28 65 6e 76 69 72 | = saves|tr(envir|
|000060b0| 6f 6e 5b 6a 5d 29 3b 0d | 09 74 6d 70 65 6e 76 5b |on[j]);.|.tmpenv[|
|000060c0| 6d 61 78 5d 20 3d 20 4e | 75 6c 6c 63 68 3b 0d 09 |max] = N|ullch;..|
|000060d0| 65 6e 76 69 72 6f 6e 20 | 3d 20 74 6d 70 65 6e 76 |environ |= tmpenv|
|000060e0| 3b 09 09 2f 2a 20 74 65 | 6c 6c 20 65 78 65 63 20 |;../* te|ll exec |
|000060f0| 77 68 65 72 65 20 69 74 | 20 69 73 20 6e 6f 77 20 |where it| is now |
|00006100| 2a 2f 0d 20 20 20 20 7d | 0d 20 20 20 20 69 66 20 |*/. }|. if |
|00006110| 28 21 76 61 6c 29 20 7b | 0d 09 77 68 69 6c 65 20 |(!val) {|..while |
|00006120| 28 65 6e 76 69 72 6f 6e | 5b 69 5d 29 20 7b 0d 09 |(environ|[i]) {..|
|00006130| 20 20 20 20 65 6e 76 69 | 72 6f 6e 5b 69 5d 20 3d | envi|ron[i] =|
|00006140| 20 65 6e 76 69 72 6f 6e | 5b 69 2b 31 5d 3b 0d 09 | environ|[i+1];..|
|00006150| 20 20 20 20 69 2b 2b 3b | 0d 09 7d 0d 09 72 65 74 | i++;|..}..ret|
|00006160| 75 72 6e 3b 0d 20 20 20 | 20 7d 0d 20 20 20 20 69 |urn;. | }. i|
|00006170| 66 20 28 21 65 6e 76 69 | 72 6f 6e 5b 69 5d 29 20 |f (!envi|ron[i]) |
|00006180| 7b 09 09 09 2f 2a 20 64 | 6f 65 73 20 6e 6f 74 20 |{.../* d|oes not |
|00006190| 65 78 69 73 74 20 79 65 | 74 20 2a 2f 0d 09 52 65 |exist ye|t */..Re|
|000061a0| 6e 65 77 28 65 6e 76 69 | 72 6f 6e 2c 20 69 2b 32 |new(envi|ron, i+2|
|000061b0| 2c 20 63 68 61 72 2a 29 | 3b 09 2f 2a 20 6a 75 73 |, char*)|;./* jus|
|000061c0| 74 20 65 78 70 61 6e 64 | 20 69 74 20 61 20 62 69 |t expand| it a bi|
|000061d0| 74 20 2a 2f 0d 09 65 6e | 76 69 72 6f 6e 5b 69 2b |t */..en|viron[i+|
|000061e0| 31 5d 20 3d 20 4e 75 6c | 6c 63 68 3b 09 2f 2a 20 |1] = Nul|lch;./* |
|000061f0| 6d 61 6b 65 20 73 75 72 | 65 20 69 74 27 73 20 6e |make sur|e it's n|
|00006200| 75 6c 6c 20 74 65 72 6d | 69 6e 61 74 65 64 20 2a |ull term|inated *|
|00006210| 2f 0d 20 20 20 20 7d 0d | 20 20 20 20 65 6c 73 65 |/. }.| else|
|00006220| 0d 09 53 61 66 65 66 72 | 65 65 28 65 6e 76 69 72 |..Safefr|ee(envir|
|00006230| 6f 6e 5b 69 5d 29 3b 0d | 20 20 20 20 4e 65 77 28 |on[i]);.| New(|
|00006240| 39 30 34 2c 20 65 6e 76 | 69 72 6f 6e 5b 69 5d 2c |904, env|iron[i],|
|00006250| 20 73 74 72 6c 65 6e 28 | 6e 61 6d 29 20 2b 20 73 | strlen(|nam) + s|
|00006260| 74 72 6c 65 6e 28 76 61 | 6c 29 20 2b 20 32 2c 20 |trlen(va|l) + 2, |
|00006270| 63 68 61 72 29 3b 0d 23 | 69 66 6e 64 65 66 20 4d |char);.#|ifndef M|
|00006280| 53 44 4f 53 0d 20 20 20 | 20 28 76 6f 69 64 29 73 |SDOS. | (void)s|
|00006290| 70 72 69 6e 74 66 28 65 | 6e 76 69 72 6f 6e 5b 69 |printf(e|nviron[i|
|000062a0| 5d 2c 22 25 73 3d 25 73 | 22 2c 6e 61 6d 2c 76 61 |],"%s=%s|",nam,va|
|000062b0| 6c 29 3b 2f 2a 20 61 6c | 6c 20 74 68 61 74 20 77 |l);/* al|l that w|
|000062c0| 6f 72 6b 20 6a 75 73 74 | 20 66 6f 72 20 74 68 69 |ork just| for thi|
|000062d0| 73 20 2a 2f 0d 23 65 6c | 73 65 0d 20 20 20 20 2f |s */.#el|se. /|
|000062e0| 2a 20 4d 53 2d 44 4f 53 | 20 72 65 71 75 69 72 65 |* MS-DOS| require|
|000062f0| 73 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 20 76 61 |s enviro|nment va|
|00006300| 72 69 61 62 6c 65 20 6e | 61 6d 65 73 20 74 6f 20 |riable n|ames to |
|00006310| 62 65 20 69 6e 20 75 70 | 70 65 72 63 61 73 65 20 |be in up|percase |
|00006320| 2a 2f 0d 20 20 20 20 2f | 2a 20 5b 54 6f 6d 20 44 |*/. /|* [Tom D|
|00006330| 69 6e 67 65 72 2c 20 32 | 37 20 41 75 67 75 73 74 |inger, 2|7 August|
|00006340| 20 31 39 39 30 3a 20 57 | 65 6c 6c 2c 20 69 74 20 | 1990: W|ell, it |
|00006350| 64 6f 65 73 6e 27 74 20 | 5f 72 65 71 75 69 72 65 |doesn't |_require|
|00006360| 5f 20 69 74 2c 20 62 75 | 74 0d 20 20 20 20 20 2a |_ it, bu|t. *|
|00006370| 20 73 6f 6d 65 20 75 74 | 69 6c 69 74 69 65 73 20 | some ut|ilities |
|00006380| 61 6e 64 20 61 70 70 6c | 69 63 61 74 69 6f 6e 73 |and appl|ications|
|00006390| 20 6d 61 79 20 62 72 65 | 61 6b 20 62 65 63 61 75 | may bre|ak becau|
|000063a0| 73 65 20 74 68 65 79 20 | 6f 6e 6c 79 20 6c 6f 6f |se they |only loo|
|000063b0| 6b 0d 20 20 20 20 20 2a | 20 66 6f 72 20 75 70 70 |k. *| for upp|
|000063c0| 65 72 20 63 61 73 65 20 | 73 74 72 69 6e 67 73 2e |er case |strings.|
|000063d0| 20 28 46 69 78 65 64 20 | 73 74 72 75 70 72 28 29 | (Fixed |strupr()|
|000063e0| 20 62 75 67 20 68 65 72 | 65 2e 29 5d 0d 20 20 20 | bug her|e.)]. |
|000063f0| 20 20 2a 2f 0d 20 20 20 | 20 73 74 72 63 70 79 28 | */. | strcpy(|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.